<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Vignesh Suresh on Medium]]></title>
        <description><![CDATA[Stories by Vignesh Suresh on Medium]]></description>
        <link>https://medium.com/@vigneshs4499?source=rss-c952ce22d604------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*njPwKeZJZkEiOIeH4rd0OA.jpeg</url>
            <title>Stories by Vignesh Suresh on Medium</title>
            <link>https://medium.com/@vigneshs4499?source=rss-c952ce22d604------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 15:30:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vigneshs4499/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Building a GenAI-Powered Q&A Chatbot in Python: From Prompt to Persona using Gemini Flash LLM]]></title>
            <link>https://vigneshs4499.medium.com/building-a-genai-powered-q-a-chatbot-in-python-from-prompt-to-persona-using-gemini-flash-llm-9b2218a2c036?source=rss-c952ce22d604------2</link>
            <guid isPermaLink="false">https://medium.com/p/9b2218a2c036</guid>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[google-gemini]]></category>
            <dc:creator><![CDATA[Vignesh Suresh]]></dc:creator>
            <pubDate>Sun, 17 Aug 2025 13:34:04 GMT</pubDate>
            <atom:updated>2025-08-17T13:34:04.660Z</atom:updated>
            <content:encoded><![CDATA[<p>A modular guide to crafting intelligent, ethical, and narrative-rich assistants.</p><p>At the heart of any GenAI chatbot lies the prompt — the invisible script that guides the model’s behavior. Think of it as the bot’s internal compass: it tells the AI <em>how</em> to think, <em>what</em> to prioritize, and <em>how</em> to speak. In this section, we’ll build a simple chatbot with Gemini LLM and Python.</p><h3>🔧 Step 1: Install libraries</h3><p>First, we will install all libraries required for this LLM app</p><p><em>streamlit and google-generative ai.</em></p><p>Just use pip install and name of the library like shown below</p><pre>pip install streamlit<br>pip install google-genai</pre><h3>🔌 Step 2: Connect to Gemini API</h3><p>Go to <a href="https://aistudio.google.com/welcome?utm_source=PMAX&amp;utm_medium=display&amp;utm_campaign=FY25-global-DR-pmax-1710442&amp;utm_content=pmax&amp;gclsrc=aw.ds&amp;gad_source=1&amp;gad_campaignid=21521982195&amp;gbraid=0AAAAACn9t67PW4qMQZmwGXmagQ9z79ZJK&amp;gclid=Cj0KCQjw-4XFBhCBARIsAAdNOktK2IgBslZg67EwDQdAuHJzsxstIMdg-I8PzZIaKVhBrtKk3j8bkGcaAurxEALw_wcB">https://aistudio.google.com/</a>. Register and create a free account and get your Gemini API key. Now this will help in making the app speak like human. You can either store the key in environment variables or use the key with the app by connecting it into .env file. We will be using .env file</p><h3>📈Step 3: Code the App</h3><pre><br>#import libraries<br>import streamlit as st<br>import google.generativeai as genai <br>import os<br>from dotenv import load_dotenv</pre><p>In the above code, we have imported streamlit for UI, google genai as our model, os for os interaction and dotenv toload environment variables from a .env file into the application&#39;s environment.</p><pre>#API_KEY<br>genai.configure(api_key=os.getenv(&#39;GOOGLE_API_KEY&#39;))</pre><p>To keep your GenAI app secure and deployment-ready, we load the API key from a <strong>.env</strong> file.</p><p><strong>It does 2 things</strong></p><ol><li>Keeps Secrets Safe</li><li>Authenticates GenAi client (Here it is Gemini Flash)</li></ol><p>Then, using <strong>os.getenv(),</strong> you fetch it securely at runtime. This prevents accidental leaks when sharing code or pushing to GitHub.</p><pre>#Generate response<br>def generate_response(question,prompt):<br>    model = genai.GenerativeModel(&#39;gemini-2.0-flash&#39;)<br>    response = model.generate_content([prompt[0],question])<br>    return response.text<br><br>#Prompt<br>prompt = [<br>    &quot;You are a helpful assistant. Please response to my queries in a proper sentence.&quot;<br>]</pre><p>In the above code, we create a function to generate response which will be called in the UI creation section. We pass 2 parameters, prompt and question. <strong>prompt</strong> will be prompt template and <strong>question</strong> will be the input.</p><p>We also design a prompt template saying <em>“You are a helpful assistant. Please response to my queries in a proper sentence.”</em></p><p>This is important and most cruicial part as this will make or break the model. The prompt will help the model understand your query and answer accordingly.</p><pre>#Creating a Streamlit <br>st.title(&#39;CHATBOT WITH GEMINI FLASH&#39;)<br>question = st.text_input(&#39;Enter the question&#39;,key=input)<br>submit = st.button(&#39;Get the answer&#39;)<br><br>if submit:<br>    response = generate_response(question,prompt)<br>    st.write(response)</pre><p>In above code, we create a simple UI with Streamlit and call the function when the user clicks on the button to control execution. we then use <strong>st.write</strong> to print the response on the app.</p><p>✅Step 4: Test the App</p><p>Run the command as shown below</p><pre>streamlit run appname.py</pre><p>The app displays in the localhost as shown below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rjZE4m3rzRcVg9Cc5gpkjQ.png" /></figure><p>Lastly, try and test with some questions to check how model performs. Some questions asked by me are shown below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zGt2AHjVw4F7mpnfFeiyiQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aESyNpW6cfclphRflg9xdg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3aIdXZHHwfi2J8HMhb_M1g.png" /></figure><p>You can find the code <a href="https://github.com/Vignesh424/LLM-Q-A/tree/main">here</a>.</p><p>Thank you for reading. Connect with me on <a href="https://twitter.com/AIExpTablFtZen?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor">Twitter</a> and <a href="https://in.linkedin.com/in/vignesh424">LinkedIn</a>, and check out my <a href="https://public.tableau.com/app/profile/vignesh.suresh1214">Tableau Public</a> and <a href="https://github.com/Vignesh424/">Github</a> profile.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b2218a2c036" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create a Kagi Chart in Tableau]]></title>
            <link>https://vigneshs4499.medium.com/how-to-create-a-kagi-chart-in-tableau-0db35ee8875b?source=rss-c952ce22d604------2</link>
            <guid isPermaLink="false">https://medium.com/p/0db35ee8875b</guid>
            <category><![CDATA[stocks]]></category>
            <category><![CDATA[tableau-desktop]]></category>
            <category><![CDATA[tableau]]></category>
            <category><![CDATA[kagi-chart]]></category>
            <dc:creator><![CDATA[Vignesh Suresh]]></dc:creator>
            <pubDate>Sun, 04 May 2025 07:31:00 GMT</pubDate>
            <atom:updated>2025-05-04T07:31:00.552Z</atom:updated>
            <content:encoded><![CDATA[<p>In this tutorial, I will showing you how to create a Kagicharts in Tableau.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fzdJ8zlhmmgyN9HhC6uXOA.png" /><figcaption>Source: <a href="https://datavizcatalogue.com/methods/kagi_chart.html">https://datavizcatalogue.com/methods/kagi_chart.html</a></figcaption></figure><h3>What are Kagi Charts?</h3><p>Kagi charts are a type of financial chart used in technical analysis that focuses on price movements, largely ignoring time and volume. Instead of plotting price against time, Kagi charts use a series of vertical lines and connecting horizontal lines to represent the general direction of price trends. A Kagi line continues in its current direction until the price moves a specific reversal amount, predetermined by the user, after which the line changes direction. This reversal amount helps to filter out minor price fluctuations and highlight significant trends, making it easier for traders to identify potential entry and exit points in the market.</p><p>We will use Stock data to visualize P&amp;F or Point and Figures Charts.</p><p>Lets create following Calculations</p><h3>Difference</h3><p>This is the difference between two values of Volume.</p><pre>ZN(SUM([Volume])) - LOOKUP(ZN(SUM([Volume])), -1)</pre><h3>Color</h3><p>This is the color for movement indication</p><pre>if [Difference]&lt;0 THEN &#39;Down&#39;<br>ELSEIF [Difference]&gt;0 THEN &#39;Up&#39;<br>ELSE &#39;No Movement&#39; END</pre><ol><li>Drag Date to Columns. Make it Continuous</li><li>Drag Volume to Rows</li><li>Choose the Mark Type as Line</li><li>Drag Color to Color and Size. Adjust the Size. Choose Red for Down and Green for Up. For No Movement, choose Grey.</li></ol><p>If it goes well, you should see the following.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4BDH8c3ZUv11MadfmPy0RQ.png" /></figure><p>Thank you for reading. Connect with me on <a href="https://twitter.com/AIExpTablFtZen?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor">Twitter</a> and <a href="https://in.linkedin.com/in/vignesh424">LinkedIn</a>, and check out my <a href="https://public.tableau.com/app/profile/vignesh.suresh1214">Tableau Public</a> profile for more visualizations.</p><p>Vignesh Suresh</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0db35ee8875b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create a P&F Charts in Tableau]]></title>
            <link>https://vigneshs4499.medium.com/how-to-create-a-p-f-charts-in-tableau-5783dd0c4753?source=rss-c952ce22d604------2</link>
            <guid isPermaLink="false">https://medium.com/p/5783dd0c4753</guid>
            <category><![CDATA[point-and-figure-chart]]></category>
            <category><![CDATA[stocks]]></category>
            <category><![CDATA[tableau-desktop]]></category>
            <category><![CDATA[tableau-training]]></category>
            <category><![CDATA[tableau]]></category>
            <dc:creator><![CDATA[Vignesh Suresh]]></dc:creator>
            <pubDate>Sun, 04 May 2025 07:19:29 GMT</pubDate>
            <atom:updated>2025-05-04T07:19:29.302Z</atom:updated>
            <content:encoded><![CDATA[<p>In this tutorial, I will showing you how to create a P&amp;F charts in Tableau.</p><figure><img alt="Stock" src="https://cdn-images-1.medium.com/max/1024/1*h5gdocGXe4tdR-YSkE90cA.png" /><figcaption>Image Source: <a href="https://datavizcatalogue.com/methods/point_and_figure_chart.html">https://datavizcatalogue.com/methods/point_and_figure_chart.html</a></figcaption></figure><h3>What are P&amp;F or Point and Figures Charts?</h3><p>Point and Figure charts are a type of price chart that filters out time and focuses solely on price movements, making them useful for identifying support and resistance levels and potential trading opportunities. Unlike traditional time-based charts, such as candlestick or bar charts, Point and Figure charts do not display time along the horizontal axis, instead representing price changes with columns of Xs and Os. A column of Xs indicates rising prices, while a column of Os represents falling prices.</p><p>We will use Stock data to visualize P&amp;F or Point and Figures Charts.</p><p>Lets create following Calculations</p><h3>Box Size</h3><p>This determines the minimum price movement required to add a new X (upward movement) or O (downward movement) to the chart. A larger box size filters out minor fluctuations, making the chart less sensitive to small price changes.</p><pre>FLOOR([Close] /0.5) * 0.5</pre><h3>Difference</h3><p>This is the difference between two values of Volume.</p><pre>ZN(SUM([Volume])) - LOOKUP(ZN(SUM([Volume])), -1)</pre><h3>Reversals</h3><p>This defines how much the price must move in the opposite direction to trigger a new column. For example, if the reversal amount is set to 3 boxes, the price must drop by at least 3 box sizes before a new column of Os appears (or rise by 3 box sizes for a new column of Xs). This helps smooth out noise and focus on significant trends.</p><pre>IF ([Difference]) &gt;= 1 THEN<br>  &#39;X&#39; <br> ELSE &#39;O&#39;<br>END</pre><ol><li>Drag Date to Columns and choose Granularity of your choice. I have chosen Week.</li><li>Drag Box Size to Rows.</li><li>Choose the Mark Type as Text.</li><li>Drag Reversals to Color and Text. Choose Green for X and Red for Os.</li><li>Drag SUM(Close) to Detail.</li></ol><p>If it goes well, you should see the following.</p><figure><img alt="Stock" src="https://cdn-images-1.medium.com/max/1024/1*49ctiCa7q7PSqHJ5yK1IfA.png" /></figure><p>Thank you for reading. Connect with me on <a href="https://twitter.com/AIExpTablFtZen?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor">Twitter</a> and <a href="https://in.linkedin.com/in/vignesh424">LinkedIn</a>, and check out my <a href="https://public.tableau.com/app/profile/vignesh.suresh1214">Tableau Public</a> profile for more visualizations.</p><p>Vignesh Suresh</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5783dd0c4753" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bar and Avg Line with a Twist.]]></title>
            <link>https://vigneshs4499.medium.com/bar-and-avg-line-with-a-twist-fb1b148a0207?source=rss-c952ce22d604------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb1b148a0207</guid>
            <category><![CDATA[tableau-desktop]]></category>
            <category><![CDATA[tableau-training]]></category>
            <category><![CDATA[tableau]]></category>
            <dc:creator><![CDATA[Vignesh Suresh]]></dc:creator>
            <pubDate>Thu, 13 Feb 2025 04:18:55 GMT</pubDate>
            <atom:updated>2025-02-13T04:18:55.785Z</atom:updated>
            <content:encoded><![CDATA[<p>In this tutorial, I will show you how to add Labels above the Bar and show Prior Sales with an Avg Line</p><p>There are 2 Parts in this.</p><ol><li>Labels above the Bar</li><li>Adding Reference Line and Label</li></ol><h3>Labels above the Bar</h3><ol><li>Connect to Superstore Data</li><li>Create 2 Calculations.</li></ol><p>Sales 2024</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/855/1*iB41-0RruqtLwYFx-zHb1w.png" /></figure><p>Sales 2023</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*d9mYAtNjQxZsitHLBPsRLg.png" /></figure><p>Building the Visualization</p><ol><li>Drag Sales 2024 to Columns</li><li>Drag Segment to Rows. Create an inline calculation AVG(0) and do a Dual Axis. Choose the second chart as Gantt and first as Bar.</li><li>Drag Sales 2023 to Detail in first chart chosen as Bar chart.</li><li>Drag Measure Names to Rows. Drag Segment and Sales 2024 to Label. Format the Labels.</li><li>From Analytics Pane, Drag Average Line at Cell level.</li><li>Choose the values for the parameters as shown below</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*JTWcbjBlPag36lwjTRYAXw.png" /></figure><p>7. Right click -&gt; Format Reference Line. Reduce the Shading. Format the Label.</p><p>8. Choose the Alignment as Right and Middle. If it goes well, you should see the following</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cZEihe02b_iFLrDKL4Y5nw.png" /></figure><p>Thank you for reading. Connect with me on <a href="https://twitter.com/AIExpTablFtZen?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor">Twitter</a> and <a href="https://in.linkedin.com/in/vignesh424">LinkedIn</a>, and check out my <a href="https://public.tableau.com/app/profile/vignesh.suresh1214">Tableau Public</a> profile for more visualizations.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb1b148a0207" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Custom Financial Year Period in Tableau]]></title>
            <link>https://vigneshs4499.medium.com/custom-financial-year-period-in-tableau-0143e8ee9f64?source=rss-c952ce22d604------2</link>
            <guid isPermaLink="false">https://medium.com/p/0143e8ee9f64</guid>
            <category><![CDATA[tableau]]></category>
            <category><![CDATA[tableau-desktop]]></category>
            <dc:creator><![CDATA[Vignesh Suresh]]></dc:creator>
            <pubDate>Mon, 16 Dec 2024 16:15:48 GMT</pubDate>
            <atom:updated>2024-12-16T16:15:48.173Z</atom:updated>
            <content:encoded><![CDATA[<p>In India, the Financial Year starts from April. But there are many Countries where Financial Year starts from July, October etc. In this tutorial, you will learn how to have Custom Financial Year Period using Parameter.</p><h3>Creating Parameter</h3><p>Create a Parameter as shown below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*QMbJ_86NH8D9mFZeUzgflg.png" /></figure><h3>Creating Calculations</h3><p>Start FY</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/616/1*DCMVGEl5-VmpPJaDbhaM-A.png" /></figure><p>End FY</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*aQG9V6sYHFCUtTkfn2FdgQ.png" /></figure><p>Sales FY</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*mNPkM2ZH1MvPyMuuhdgiJA.png" /></figure><p>Current FY</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*6XVmG8bH-Nth_exgZIj2mw.png" /></figure><p>Now we have 3 Calculations. Let’s build the view.</p><p>Drag the <strong>Date</strong> on the Columns. Choose <strong>Continuous Month.</strong></p><p>Drag <strong>Sales</strong> to Rows.</p><p>Right Click on the Parameter created for Date -&gt; Show Parameter. Choose an option say June-2023. You will get a view as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ySMJWD2O99_16Y_BljLceg.png" /></figure><p>You can fix the view in 2 ways. Either Drag <strong>Current FY </strong>to filters and Choose <strong>True, </strong>else Create a Calculation as shown below and add it to filters and Choose <strong>True.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*6luW1ODykGdvjzp1nnV1RQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*fZDZP4MtbzImD5eE4QPo9w.png" /></figure><p>I did the same for my viz Superstore Regional Sales Scorecard with Targets (Custom Financial Year). You can find it <a href="https://public.tableau.com/app/profile/vignesh.suresh1214/viz/CustomFinancialYearKPIDashboard/Dashboard1">here.</a></p><p>Thank you for reading. Connect with me on <a href="https://twitter.com/AIExpTablFtZen?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor">Twitter</a> and <a href="https://in.linkedin.com/in/vignesh424">LinkedIn</a>, and check out my <a href="https://public.tableau.com/app/profile/vignesh.suresh1214">Tableau Public</a> profile for more visualizations.</p><p>Vignesh Suresh</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0143e8ee9f64" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating Heart Waffles in Tableau]]></title>
            <link>https://vigneshs4499.medium.com/creating-heart-waffles-in-tableau-aab8aaf8c82c?source=rss-c952ce22d604------2</link>
            <guid isPermaLink="false">https://medium.com/p/aab8aaf8c82c</guid>
            <category><![CDATA[tableau-desktop]]></category>
            <dc:creator><![CDATA[Vignesh Suresh]]></dc:creator>
            <pubDate>Sat, 02 Nov 2024 16:05:57 GMT</pubDate>
            <atom:updated>2024-11-28T17:08:51.982Z</atom:updated>
            <content:encoded><![CDATA[<p>I was busy with other things and personal commitments, so I am a little late with this blog.</p><p>I was inspired by <a href="https://public.tableau.com/app/profile/ellen4268/viz/heart_17176865031980/2">Ellen Blackburn</a> and <a href="https://public.tableau.com/app/profile/josh.hughes/viz/Valentinesday_16135883419490/Dashboard1">Josh Hughes’s </a>Visualizations which featured a heart waffle chart and I wanted to create one. Great work Ellen and Josh.</p><p>In this, we need 2 datasets, heart points and the main data, which are very similar to a normal waffle chart.</p><p>First, load the main dataset. We will be using a simple dataset as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/176/1*v_Gnq_wpFoON2cG1nahwBw.png" /></figure><p>Next is the heart coordinates. If you know, or have created a Waffle Chart this is easy. The only difference is that in the Waffle Chart, it is 100 points forming a grid, and in the Heart Waffle, it is 100 points forming a Heart, but 1 point is created for the Heart design.</p><p>You can find the heart coordinates <a href="https://github.com/Vignesh424/Heart-Waffle">here</a>.</p><p>Now, we will join the dataset. We will be doing an Inner Join with the Dummy Calculation 1, the same as we do for Waffle Charts as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QKopDt4kjdlQf8YOPlimeA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*tCoCwYUmH2z2tmc2JYy-eg.png" /></figure><p>Now, let’s build the visualization.</p><p>Drag <strong>X</strong> to <strong>Columns</strong> and <strong>Y</strong> to <strong>Rows</strong>. We get a Heart shape. There are 101 points as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/1*qrAakLHCEMeRqpRq9jr5Cg.png" /></figure><p>Now, let’s create a calculation to show the Percentage. We want the <strong>Average</strong> <strong>of Percentage</strong> data, greater than equal to the<strong> Average Percentage</strong> value of Heart Points.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*V_N3GO0XULfa4AFWADp-Ng.png" /></figure><p>We get a <strong>True False calculation</strong>. Drag the same to <strong>Color</strong> and we get the following</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/1*8IIOAqk53xx7yL2sOzF1Pw.png" /></figure><p>Drag the <strong>Category</strong> to the <strong>Columns</strong> beside <strong>X</strong>. <strong>Use Annotations</strong> to show the percentage. After formatting, the visualization looks as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gds2xjgS_AtySdIiqu_WJA.png" /></figure><p>Hope you found the tutorial helpful. Find the visualization <a href="https://public.tableau.com/app/profile/vignesh.suresh1214/viz/HeartWaffleChartsinTableau/Dashboard1?publish=yes">here.</a></p><p>Thank you for reading. Connect with me on <a href="https://twitter.com/AIExpTablFtZen?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor">Twitter</a> and <a href="https://in.linkedin.com/in/vignesh424">LinkedIn</a>, and check out my <a href="https://public.tableau.com/app/profile/vignesh.suresh1214">Tableau Public</a> profile for more visualizations.</p><p>Vignesh Suresh</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aab8aaf8c82c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Calculation Series: How to find Last day of the current month, Last day of the previous month, and…]]></title>
            <link>https://vigneshs4499.medium.com/calculation-series-how-to-find-last-day-of-the-current-month-last-day-of-the-previous-month-and-b0d9a1da828f?source=rss-c952ce22d604------2</link>
            <guid isPermaLink="false">https://medium.com/p/b0d9a1da828f</guid>
            <dc:creator><![CDATA[Vignesh Suresh]]></dc:creator>
            <pubDate>Sat, 21 Sep 2024 10:24:50 GMT</pubDate>
            <atom:updated>2024-09-21T10:24:50.718Z</atom:updated>
            <content:encoded><![CDATA[<h3>Calculation Series: How to find Last day of the current month, Last day of the previous month, and the Last day of the next month.</h3><p>In this blog, I will be showing you how to create Calculations for <strong>Last day of the current month, Last day of the previous month </strong>and <strong>Last day of the next month.</strong></p><h3>Last day of the Current Month</h3><p>This requires 3 steps. They are as follows:-</p><ol><li>We first use DATETRUNC() at the month level with TODAY(), giving us the <strong>current month’s first day.</strong></li><li>Use DATEADD to deduct a day from the current month’s first day. We get <strong>Last day of the Previous Month.</strong></li><li>Use DATEADD to add a month to the calculated <strong>Last day of the Previous Month. </strong>The calculation looks like as shown below.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*s052k8g4-lEbl52uRAAOZw.png" /></figure><h3>Last day of the Previous Month</h3><p>This requires 2 steps. They are as follows:-</p><ol><li>We first use DATETRUNC() at the month level with TODAY(), giving us the <strong>current month’s first day.</strong></li><li>Use DATEADD to deduct a day from the current month’s first day. We get <strong>Last day of the Previous Month. </strong>The calculation looks like as shown below.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*SYrgglhUAk24Df5G3vN6XQ.png" /></figure><h3>Last day of the Next Month</h3><p>This requires 3 steps. They are as follows:-</p><ol><li>We first use DATETRUNC() at the month level with TODAY(), giving us the <strong>current month’s first day.</strong></li><li>Use DATEADD to deduct a day from the current month’s first day. We get <strong>Last day of the Previous Month.</strong></li><li>Use DATEADD to add 2 months to the calculated <strong>Last day of the Previous Month. </strong>The calculation looks like as shown below.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*EIPv0CzzDLF5gAAw51ro7g.png" /></figure><p>Hope you found the tutorial helpful.</p><p>Thank you for reading. Connect with me on <a href="https://twitter.com/AIExpTablFtZen?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor">Twitter</a> and <a href="https://in.linkedin.com/in/vignesh424">LinkedIn</a>, and check out my <a href="https://public.tableau.com/app/profile/vignesh.suresh1214">Tableau Public</a> profile for more visualizations.</p><p>Vignesh Suresh</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0d9a1da828f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[3 Pie/Doughnut Charts in Tableau with Map Layers.]]></title>
            <link>https://vigneshs4499.medium.com/3-pie-doughnut-charts-in-tableau-with-map-layers-23beb8a7dd9d?source=rss-c952ce22d604------2</link>
            <guid isPermaLink="false">https://medium.com/p/23beb8a7dd9d</guid>
            <category><![CDATA[tableau]]></category>
            <category><![CDATA[tableau-desktop]]></category>
            <dc:creator><![CDATA[Vignesh Suresh]]></dc:creator>
            <pubDate>Sun, 01 Sep 2024 16:33:53 GMT</pubDate>
            <atom:updated>2024-09-01T16:40:51.798Z</atom:updated>
            <content:encoded><![CDATA[<p>In this tutorial, I will show how to create 3 Pie/Doughnut Charts in Tableau. We will use Map Layers for each of these tutorials, so Tableau 2020.4 or greater needs to be installed.</p><h3>Image Sector Pie Chart</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/1*Gd_MO8XNtZbTaFeIdKVd5w.png" /></figure><p>Open Tableau. We will be using a custom dataset as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/245/1*f6Ywp8zKeQKgc3V1RYEPuw.png" /></figure><p>We need 2 Layers, the Image and the Pie. We start with the Image layer.</p><p>Create a Calculation Base as shown below and drag it to the Sheet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/1*5gU0p1Ayrn9kB-UMqNqMBQ.png" /></figure><p>Change the Mark to an Image. Get the image of a <strong>Cookie</strong> to the Tableau Repository Shapes Folder and it should look like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/317/1*sW5KEyTukvsL05SL-7Ht0w.png" /></figure><p>Our Image Layer is complete. Now comes the Pie layer, Drag the Base calculation again on the Sheet. This time, choose Mark type as Pie. Drag Brand Name to Color and Value to Angle shelf. We will highlight <strong>“Our Brand”</strong> value in the Brand Name column.</p><p>So, choose 2 color shades (I have taken Red here.) for other Brands. For<strong> Our Brand</strong> sector of the pie, we need to have the cookie image seen. So, we will not choose the normal color but will choose the Transparent Color. Create a new palette as shown below</p><pre>&lt;color-palette name=&quot;Transparent White&quot; type=&quot;regular&quot; &gt;<br>&lt;color&gt;#FFFFFF00&lt;/color&gt;<br>&lt;/color-palette&gt;</pre><p>After creating a palette, Close and Open Tableau. You should be able to see the Transparent palette. It will look as shown below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/1*Gd_MO8XNtZbTaFeIdKVd5w.png" /></figure><p>Our Brand is colored with a Transparent Color.</p><p>We can use this visual to highlight a particular brand in presentations created in PowerPoint or Tableau. Do not use this in Business Dashboards.</p><h3>Image Pie Chart</h3><p>Again, we have 2 Layers, the Image layer, and the Pie layer. We will be using a fictional dataset as shown below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/231/1*GDVCvLXC2IYZuYy-ZtizrQ.png" /></figure><p>We start with the Image layer.</p><p>Use the same Calculation Base as shown below and drag it to the Sheet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/1*5gU0p1Ayrn9kB-UMqNqMBQ.png" /></figure><p>Change the Mark to an Image. Get the image of <strong>1 dollar coin </strong>to Tableau Repository Shapes Folder and it should look like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/280/1*nnZvdW7Y_-wUXzKXN8F-wg.png" /></figure><p>Our Image Layer is complete. Now comes the Pie layer, Drag the Base calculation again on the Sheet. This time, choose Mark type as Pie. Drag Breakup of Expenses to Color and Value to Angle shelf. Color all the values as the Transparent Color. It will look as shown below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/363/1*ZeGWtf-FTO6IR6UdgVmv6w.png" /></figure><p>The pie is colored with a Transparent Color.</p><p>We can use this visual to highlight a particular brand in presentations created in PowerPoint or Tableau. Do not use this in Business Dashboards.</p><h3>3D Doughnut Chart</h3><p>Connect to the Superstore Dataset in Tableau. For this, we need 3 Layers, the Pie, the Doughnut hole, and the 3D effect circle.</p><p>We start with the Pie layer. Drag the Base calculation in the sheet. Choose Mark type as Pie. Drag Category to Color and Sales to Angle. Increase the size as needed. It will look as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*Pj-8V2y_pSMOzyRJoQIEtg.png" /></figure><p>Then comes our Doughnut hole layer, Drag the Base calculation to the Sheet. Choose Mark as a Circle and color it White. It should look as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*7i4MWzJeDM9A-7Yw_3PZxw.png" /></figure><p>Now comes the 3D effect circle layer, Drag the Base calculation to the Sheet. Choose Mark type as Circle. Increase the size but it should be more than the middle circle. Choose color as Black and reduce the opacity to 30%(You can adjust as per your needs). It will look as shown below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/1*GOon0RQtrGkFeZb_ZZoEMA.png" /></figure><p>Do not use this in Business Dashboards. This is just a creativity kind of visual and gives us a sense of what Tableau as a tool can do.</p><p>Thank you for reading. Connect with me on <a href="https://twitter.com/AIExpTablFtZen?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor">Twitter</a> and <a href="https://in.linkedin.com/in/vignesh424">LinkedIn</a>, and check out my <a href="https://public.tableau.com/app/profile/vignesh.suresh1214">Tableau Public</a> profile for more visualizations.</p><p>Vignesh Suresh</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=23beb8a7dd9d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DMS Coordinates to Decimal Coordinates for Maps in Tableau]]></title>
            <link>https://vigneshs4499.medium.com/dms-coordinates-to-decimal-coordinates-for-maps-in-tableau-38cc17ec66c4?source=rss-c952ce22d604------2</link>
            <guid isPermaLink="false">https://medium.com/p/38cc17ec66c4</guid>
            <category><![CDATA[tableau]]></category>
            <category><![CDATA[tableau-training]]></category>
            <dc:creator><![CDATA[Vignesh Suresh]]></dc:creator>
            <pubDate>Sat, 20 Jul 2024 13:37:40 GMT</pubDate>
            <atom:updated>2024-07-20T13:37:40.604Z</atom:updated>
            <content:encoded><![CDATA[<p>When dealing with geographic data in Tableau, you might encounter coordinates expressed in the DMS format i.e. for degrees, minutes, and seconds, like 50°07&#39;01.9&quot;N 8°40&#39;20.8&quot;E. However, Tableau expects decimal coordinates (e.g., 50.117202 to plot spatial coordinates for Latitude and Longitude respectively)</p><p>Let’s see how to convert DMS coordinates to decimal coordinates in Tableau. 🌐</p><ol><li><strong>Latitude Conversion:</strong></li></ol><p>The DMS latitude coordinate 50°07&#39;01.9&quot;N can be converted to decimal degrees using this formula:</p><p>Decimal Latitude=Degrees+(60Minutes​)+(3600Seconds​). If the latitude direction is south, multiply the result by -1.</p><p>Here is the calculation in Tableau</p><pre>FLOAT(REGEXP_EXTRACT_NTH(REGEXP_REPLACE(REGEXP_REPLACE(REGEXP_REPLACE([Y], &quot; &quot;, &quot;&quot;), &quot;&#39;&quot;, &quot;a&quot;), &#39;&quot;&#39;, &quot;b&quot;), &quot;(\d*)°(\d*)a([\d\.]*)b([NS])&quot;, 1)) + <br>FLOAT(REGEXP_EXTRACT_NTH(REGEXP_REPLACE(REGEXP_REPLACE(REGEXP_REPLACE([Y], &quot; &quot;, &quot;&quot;), &quot;&#39;&quot;, &quot;a&quot;), &#39;&quot;&#39;, &quot;b&quot;), &quot;(\d*)°(\d*)a([\d\.]*)b([NS])&quot;, 2)) / 60 + <br>FLOAT(REGEXP_EXTRACT_NTH(REGEXP_REPLACE(REGEXP_REPLACE(REGEXP_REPLACE([Y], &quot; &quot;, &quot;&quot;), &quot;&#39;&quot;, &quot;a&quot;), &#39;&quot;&#39;, &quot;b&quot;), &quot;(\d*)°(\d*)a([\d\.]*)b([NS])&quot;, 3)) / 3600 * <br>IIF(REGEXP_EXTRACT_NTH(REGEXP_REPLACE(REGEXP_REPLACE(REGEXP_REPLACE([Y], &quot; &quot;, &quot;&quot;), &quot;&#39;&quot;, &quot;a&quot;), &#39;&quot;&#39;, &quot;b&quot;), &quot;(\d*)°(\d*)a([\d\.]*)b([NS])&quot;, 4) == &quot;N&quot;, 1, -1)</pre><p><strong>2. Longitude Conversion:</strong></p><p>For the DMS longitude coordinate 8°40&#39;20.8&quot;E, use a similar formula:</p><p>Decimal Longitude=Degrees+(60Minutes​)+(3600Seconds​). Again, adjust the sign based on the longitude direction (east or west).</p><p>Here is the calculation in Tableau</p><pre>FLOAT(REGEXP_EXTRACT_NTH(REGEXP_REPLACE(REGEXP_REPLACE(REGEXP_REPLACE([X], &quot; &quot;, &quot;&quot;), &quot;&#39;&quot;, &quot;a&quot;), &#39;&quot;&#39;, &quot;b&quot;), &quot;(\d*)°(\d*)a([\d\.]*)b([EW])&quot;, 1)) + <br>FLOAT(REGEXP_EXTRACT_NTH(REGEXP_REPLACE(REGEXP_REPLACE(REGEXP_REPLACE([X], &quot; &quot;, &quot;&quot;), &quot;&#39;&quot;, &quot;a&quot;), &#39;&quot;&#39;, &quot;b&quot;), &quot;(\d*)°(\d*)a([\d\.]*)b([EW])&quot;, 2)) / 60 + <br>FLOAT(REGEXP_EXTRACT_NTH(REGEXP_REPLACE(REGEXP_REPLACE(REGEXP_REPLACE([X], &quot; &quot;, &quot;&quot;), &quot;&#39;&quot;, &quot;a&quot;), &#39;&quot;&#39;, &quot;b&quot;), &quot;(\d*)°(\d*)a([\d\.]*)b([EW])&quot;, 3)) / 3600 * <br>IIF(REGEXP_EXTRACT_NTH(REGEXP_REPLACE(REGEXP_REPLACE(REGEXP_REPLACE([X], &quot; &quot;, &quot;&quot;), &quot;&#39;&quot;, &quot;a&quot;), &#39;&quot;&#39;, &quot;b&quot;), &quot;(\d*)°(\d*)a([\d\.]*)b([EW])&quot;, 4) == &quot;E&quot;, 1, -1)<br><br></pre><p>After creating the calculation, set the Geographic Roles for the calculations as Latitude and Longitude respectively.</p><p>Here is a step by step tutorial of doing the same in Tableau.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FheHpX80vdok%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DheHpX80vdok&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FheHpX80vdok%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/ad924911861b51c168029d1f37ddda69/href">https://medium.com/media/ad924911861b51c168029d1f37ddda69/href</a></iframe><p>Source: <a href="https://konstantingreger.net/using-coordinate-data-in-degrees-dms-format-in-tableau/">https://konstantingreger.net/using-coordinate-data-in-degrees-dms-format-in-tableau/</a></p><p>Thank you for reading. Connect with me on <a href="https://twitter.com/AIExpTablFtZen?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor">Twitter</a> and <a href="https://in.linkedin.com/in/vignesh424">LinkedIn</a>, and check out my <a href="https://public.tableau.com/app/profile/vignesh.suresh1214">Tableau Public</a> profile for more visualizations.</p><p>Vignesh Suresh</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=38cc17ec66c4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rounded Progress Unit Bar Chart in Tableau]]></title>
            <link>https://vigneshs4499.medium.com/rounded-progress-unit-bar-chart-in-tableau-69cd47c5d0b6?source=rss-c952ce22d604------2</link>
            <guid isPermaLink="false">https://medium.com/p/69cd47c5d0b6</guid>
            <category><![CDATA[tableau]]></category>
            <category><![CDATA[unitchart]]></category>
            <category><![CDATA[tableau-public]]></category>
            <dc:creator><![CDATA[Vignesh Suresh]]></dc:creator>
            <pubDate>Mon, 25 Mar 2024 14:17:34 GMT</pubDate>
            <atom:updated>2024-03-25T14:19:27.235Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>What is a Unit Chart?</strong></p><p>Unit charts are made up of individual markers like geometric shapes, icons, images, etc. Examples of unit charts are <strong>isotype charts, waffle charts, symbol charts, </strong>and<strong> pictorial charts.</strong> They are commonly used in media, advertisements, and infographics.</p><p>We will learn how to create a Rounded Progress Unit Bar Chart in Tableau</p><h3><strong><em>Steps to Create a Rounded Progress Unit Bar Chart</em></strong></h3><p>Connect to <strong>Superstore data.</strong></p><p>Create <strong>3 Calculated Fields.</strong></p><ol><li>Minimum</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/1*eat0uw4rrLDozR0cj6KQ8g.png" /></figure><p>2. Maximum</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*R4nAyTuzmVt3BQ7hy1taqQ.png" /></figure><p>3. Percent of Total Sales</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*M2FiYVvsQQYS3SWEI53aJg.png" /></figure><p>Change the <strong>Mark type</strong> to a <strong>Bar</strong>.</p><p>Drag <strong>Measure Values</strong> to <strong>Columns.</strong></p><p>Drag <strong>Measure Names</strong> to <strong>Filter</strong>. Filter to only <strong>3 calculations</strong> created above.</p><p>Drag <strong>Measure Names</strong> to <strong>Color.</strong> Color <strong>Percent of Total Sales</strong> and <strong>Minimum</strong> in the <strong>same color</strong> and <strong>Maximum</strong> in <strong>Grey</strong>.</p><p>Go to <strong>Analysis</strong> -&gt; <strong>Stack Marks</strong> -&gt; <strong>Off.</strong> If it goes well, you should see the following</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zNNl1bhBwY7GdSrCRDVmMw.png" /></figure><p>Duplicate <strong>Measure Values.</strong> Change the mark to a <strong>Circle.</strong></p><p>Right-click on the <strong>Measure Values</strong> pill -&gt; Select <strong>Dual Axis.</strong></p><p>Right-click on any of the axes -&gt; <strong>Synchronize Axis.</strong> If it goes well, you should see the following</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_kyyZWxkxOhxGrJ3sJutKQ.png" /></figure><p>Go to <strong>Analytics Pane</strong> -&gt; Add <strong>Distribution Band</strong>. Add it at <strong>Table Level.</strong></p><p>Choose <strong>Percentages</strong>. In the <strong>Aggregation</strong> choose <strong>Constant.</strong></p><p>In <strong>Percent of</strong> enter <strong>1</strong>.</p><p>Change Percentages to <strong>10,20,30,40,50,60,70,80,90 </strong>as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/394/1*LLf5TT39sGEDK48Rlfu3tQ.png" /></figure><p>Set<strong> the Label </strong>and<strong> Tooltip</strong> to <strong>None.</strong></p><p>Set the <strong>Line color</strong> to <strong>White</strong> and <strong>Fill</strong> to<strong> None.</strong></p><p><strong>Right-click</strong> -&gt; <strong>Format</strong>. Choose <strong>Fill </strong>to <strong>No Fill</strong>. If it goes well, you should see the following.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t_11ZRM1E0WIXiTRIqxINA.png" /></figure><p>Thank you for reading. Connect with me on <a href="https://twitter.com/AIExpTablFtZen?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor">Twitter</a> and <a href="https://in.linkedin.com/in/vignesh424">LinkedIn</a>, and check out my <a href="https://public.tableau.com/app/profile/vignesh.suresh1214">Tableau Public</a> profile for more visualizations.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=69cd47c5d0b6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>