cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Measures not working for Chart Visual

I need to display top 10 Products for the Year on the cards and it changes randomly so I have created a Rank Measure but i am unable to use under visual filter and add the Category/Product Name as well. Any idea 

 

PK_PBIBoss_0-1593450292415.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Measures not working for Chart Visual

Hi @PK_PBIBoss 

Add measures in card visuals

rank = RANKX(ALLSELECTED('Table 2'),CALCULATE(SUM('Table 2'[sale])),,DESC,Dense)

top1 = CALCULATE(MAX('Table 2'[product]),FILTER('Table 2',[rank]=1))

top2 = CALCULATE(MAX('Table 2'[product]),FILTER('Table 2',[rank]=2))

Capture2.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Highlighted
Super User IX
Super User IX

Re: Measures not working for Chart Visual

@PK_PBIBoss , try Top N

 

https://databear.com/power-bi-dax-topn-function/



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Highlighted
Super User V
Super User V

Re: Measures not working for Chart Visual

Hi,

Drag the Rankx measure to the filter section and select Less than equal to 10.  Create a Table visual and drag products and revenue there.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Highlighted
Frequent Visitor

Re: Measures not working for Chart Visual

I know Table filters work but for Card the Visual filter does not work with the Measure.... As I need to place 10 cards and it needs to change dynamically as per the year basis and matrix dont give the same impact.....

Highlighted
Frequent Visitor

Re: Measures not working for Chart Visual

Thanks for responding @amitchandak but that is also a measure that will not work in the chart visual filter.... I want to place 10 cards each displaying one rank ( i.e. Rank 1 or Rank 2 or Rank3 ...) and once the year slicer is change these chart change the products accordingly.... 

Highlighted
Community Support
Community Support

Re: Measures not working for Chart Visual

Hi @PK_PBIBoss 

Add measures in card visuals

rank = RANKX(ALLSELECTED('Table 2'),CALCULATE(SUM('Table 2'[sale])),,DESC,Dense)

top1 = CALCULATE(MAX('Table 2'[product]),FILTER('Table 2',[rank]=1))

top2 = CALCULATE(MAX('Table 2'[product]),FILTER('Table 2',[rank]=2))

Capture2.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Don't miss the Power BI Dev Camp this week!

August Community Highlights

Check out a full recap of the month!

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Solution Authors