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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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

Follow on LinkedIn
@ 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

Follow on LinkedIn
@ 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


Follow on LinkedIn
@ 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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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