<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Use Slider selectedvalue in calculation and plot results in circlediagram view in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-Slider-selectedvalue-in-calculation-and-plot-results-in/m-p/3695760#M143722</link>
    <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="688056" data-lia-user-login="Aglaerion" class="lia-mention lia-mention-user"&gt;Aglaerion&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please &lt;SPAN&gt;try the following methods and check if they can solve your problem:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1.Create the simple tables.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2.Select the slicer visual and drag the Ticket price into the slicer.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3.Create a new measure to calculate total. Enter the following DAX formula.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Total Cost = 
VAR SelectedTicketPrice = SELECTEDVALUE(Slicer[Ticket price], 0)
VAR NumberOfKids = SUM(Person[Kids])
RETURN
NumberOfKids * SelectedTicketPrice&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;4.Drag the Total cost to the visual.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;5.Create a new measure to calculate category. Enter the following DAX formula.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Cost Category = 
SWITCH(
    TRUE(),
    [Total Cost] &amp;lt; 20, "CAT1",
    [Total Cost] &amp;gt;= 20 &amp;amp;&amp;amp; [Total Cost] &amp;lt; 30, "CAT2",
    [Total Cost] &amp;gt;= 30, "CAT3",
    "OTHER"
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;6.Create three measures for the category.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Category1 = 
CALCULATE(
    COUNTROWS(Person),
    FILTER(
        Person,
        [Cost Category] = "CAT1"
))&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Category2 = 
CALCULATE(
    COUNTROWS(Person),
    FILTER(
        Person,
        [Cost Category] = "CAT2"
))&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Category3 = 
CALCULATE(
    COUNTROWS(Person),
    FILTER(
        Person,
        [Cost Category] = "CAT3"
))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;7.Drag three measures into the pie chart. The result is shown below.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Wisdom Wu&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 13 Feb 2024 08:19:18 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-02-13T08:19:18Z</dc:date>
    <item>
      <title>Use Slider selectedvalue in calculation and plot results in circlediagram view</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-Slider-selectedvalue-in-calculation-and-plot-results-in/m-p/3694093#M143633</link>
      <description>&lt;P&gt;Hi Guys,&lt;BR /&gt;&lt;BR /&gt;I am trying to use the value I select in a slider(ticket price) to calculate a total cost price(nr of kids * ticketprice).&lt;BR /&gt;After that I check in which price category the total cost comes into. CAT1, 2 or 3.&lt;BR /&gt;Finally I want to show the count of the category in a pie chart view.&lt;BR /&gt;&lt;BR /&gt;I have 2 very simple tables. The first is Person, containing the name of the parent, and the number of kids he has.&lt;BR /&gt;The 2nd table is the Slicer table containing the ticket price from 1-10.&lt;BR /&gt;&lt;BR /&gt;The first thing I noticed is that I can not make calulations with the slicer if the column kids is not a measure.&lt;BR /&gt;So I created a measure, but it forces me to use SUM, MIN or MAX to do it.&lt;BR /&gt;After that I can calculate with the slicer. But that gives at the bottom the result of SUM, MIN or MAX.&lt;BR /&gt;I dont want that. Because I want to make a 2nd calculation, and that is the pricecategorie. (CAT1, 2 or 3)&lt;BR /&gt;And then I want to count how many parents are in CAT1, how many in CAT2 and how many are in CAT3.&lt;BR /&gt;And that result I want to show in my pie chart. This last step I can not manage to do somehow. It only shows one (SUM, MIN or MAX) result from the table in the pie chart view.&lt;BR /&gt;&lt;BR /&gt;Can someone please help me out with this? Below you see a screenshot with my data tables, measures and the pie chart view I like to create. The middle table is on there so you can see what the calculation results are.&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 07:50:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-Slider-selectedvalue-in-calculation-and-plot-results-in/m-p/3694093#M143633</guid>
      <dc:creator>Aglaerion</dc:creator>
      <dc:date>2024-02-13T07:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: Use Slider selectedvalue in calculation and plot results in circlediagram view</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-Slider-selectedvalue-in-calculation-and-plot-results-in/m-p/3695760#M143722</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="688056" data-lia-user-login="Aglaerion" class="lia-mention lia-mention-user"&gt;Aglaerion&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please &lt;SPAN&gt;try the following methods and check if they can solve your problem:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1.Create the simple tables.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2.Select the slicer visual and drag the Ticket price into the slicer.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3.Create a new measure to calculate total. Enter the following DAX formula.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Total Cost = 
VAR SelectedTicketPrice = SELECTEDVALUE(Slicer[Ticket price], 0)
VAR NumberOfKids = SUM(Person[Kids])
RETURN
NumberOfKids * SelectedTicketPrice&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;4.Drag the Total cost to the visual.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;5.Create a new measure to calculate category. Enter the following DAX formula.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Cost Category = 
SWITCH(
    TRUE(),
    [Total Cost] &amp;lt; 20, "CAT1",
    [Total Cost] &amp;gt;= 20 &amp;amp;&amp;amp; [Total Cost] &amp;lt; 30, "CAT2",
    [Total Cost] &amp;gt;= 30, "CAT3",
    "OTHER"
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;6.Create three measures for the category.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Category1 = 
CALCULATE(
    COUNTROWS(Person),
    FILTER(
        Person,
        [Cost Category] = "CAT1"
))&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Category2 = 
CALCULATE(
    COUNTROWS(Person),
    FILTER(
        Person,
        [Cost Category] = "CAT2"
))&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Category3 = 
CALCULATE(
    COUNTROWS(Person),
    FILTER(
        Person,
        [Cost Category] = "CAT3"
))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;7.Drag three measures into the pie chart. The result is shown below.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Wisdom Wu&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 08:19:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-Slider-selectedvalue-in-calculation-and-plot-results-in/m-p/3695760#M143722</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-13T08:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: Use Slider selectedvalue in calculation and plot results in circlediagram view</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-Slider-selectedvalue-in-calculation-and-plot-results-in/m-p/3695789#M143726</link>
      <description>&lt;P&gt;Tx bro, the solution was that I had indeed create measures for the categories each with the count statement.&lt;BR /&gt;&lt;BR /&gt;I used this :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;CAT1 =&lt;/SPAN&gt; &lt;SPAN&gt;COUNTX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Person'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;[Category]&lt;/SPAN&gt;&lt;SPAN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PAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 13 Feb 2024 08:34:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-Slider-selectedvalue-in-calculation-and-plot-results-in/m-p/3695789#M143726</guid>
      <dc:creator>Aglaerion</dc:creator>
      <dc:date>2024-02-13T08:34:18Z</dc:date>
    </item>
  </channel>
</rss>

