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

Top 4 producent regardless time

HI, I would like to create a chart with top4 producers all the time and show them on timeline

 

I have a measure:

Sales 6month = DIVIDE(
calculate(sum(Sales);MONTH(Date) >= MONTH(TODAY())-6)
;
CALCULATE(sum(Sales);MONTH(date) >= MONTH(TODAY())-6;ALL(Producer))
 
If I put it into filter top4 with producers it doesnt work properly because of date on X axis. I would like to choose 4 top producers and then show them on X chart with timeline.
2 REPLIES 2
Greg_Deckler
Super User IV
Super User IV

Try:

 

Sales 6month = DIVIDE(
calculate(sum(Sales);FILTER(ALL('Table');MONTH(Date) >= MONTH(TODAY()) ) - 6)
;
CALCULATE(sum(Sales);FILTER(ALL('Table');MONTH(date) >= MONTH(TODAY()) ) - 6;ALL(Producer))
 
You need to override the filter context for your dates.

---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




it doesnt work properly, If i do with Your solution every producer has the same sales value each month and one month as blank.

Helpful resources

Announcements
MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Urdu Hindi D365 Bootcamp 768x460.png

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors