Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
djurecicK2
Super User
Super User

Ideas for cumulative results table

Hello all,

 I'm working on a model with a related date and fact table and a report with a single select slicer for fiscal year. I have created cumulative measures for totals which filter on <= selectedfiscalyear and work fine.

 

However, I also have a user requirement to show the individual items from the selected fiscal year or before on a map. Because of the relationship between date and fact tables, a single year works fine, but not sure how to show cumulative individual results. Has anyone encountered this situation before?

 

I suppose I could just forget the cumulative measures and set the slicer to multi-select so the users would need to select all years they want. But then they could select non-contiguous years like FY 2022 and FY2024. 

 

Appreciate any ideas you have.

1 ACCEPTED SOLUTION

@djurecicK2 Basically you construct the measure so that it returns 1 for every row that you want to show. Then you use the Filters pane to filter to 1. So basically:

Selector Measure = 
  VAR __SFY = SELECTEDVALUE('Fiscal'[FiscalYear])
  VAR __FY = MAX('Fiscal'[FiscalYear])
  VAR __Result = IF(__FY <= __SFY,1,0)
RETURN
  __Result

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

4 REPLIES 4
djurecicK2
Super User
Super User

@Greg_Deckler That's it- thanks!

djurecicK2
Super User
Super User

Hi @Greg_Deckler ,

 Thank you for your reply. I'm not quite sure how that would work, since I'm looking to show non-aggregated values (location), but I will look into it.

 

Thanks,

DJ

@djurecicK2 Basically you construct the measure so that it returns 1 for every row that you want to show. Then you use the Filters pane to filter to 1. So basically:

Selector Measure = 
  VAR __SFY = SELECTEDVALUE('Fiscal'[FiscalYear])
  VAR __FY = MAX('Fiscal'[FiscalYear])
  VAR __Result = IF(__FY <= __SFY,1,0)
RETURN
  __Result

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Greg_Deckler
Super User
Super User

@djurecicK2 Perhaps try using a Complex Selector: The Complex Selector - Microsoft Power BI Community


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.