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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
TheSAY
Frequent Visitor

Column Values Based on Selected Slicer - Cumulative and Specific

Hello,

 

I am trying to figure out how to go about changing a report I have created to allow cumulative and specific selected values to show.

 

The report is called Monthly FTE which provides information for enrolled children in our childcare program.  Based on a "Month" slicer, we're able to get data for the selected month.  Here's an example of what shows:

 

JANUARY - Number "1" is selected in the slicer.

JanuaryFTE.PNG

 

FEBRUARY - Number "2" is selected in the slicer.

FebruaryFTE.PNG

 

When we choose both "1" and "2" for January and February, this is what happens:

CombinedFTE.PNG

 

What we need to have happen, if "1" and "2" for January and February are selected, is:

 

1. Budget FTE should show the latest selected option.

2. Actual FTE should show the latest selected option.

3. Total Children Enrolled by Program should show the lastest selected option.

4. Total Revenue should be cumulative.  This is already happening.

5. 2019 Budget should be cumulative.  This is already happening.

6. % Rev should be cumulative.  The % has the following equation (Revenue / Budget).  It's just summing the two selected months together, rather than using the appropriate equation.

 

In the above example, if "1" and "2" for January and February were selected, it should look like:

 

BH Before Care (40)        | 40.0 | 34.2 | 37 | $14,145.00 | $14,830.00 | 95%

BH Extended Hours (20) | 21.0 | 18.6 | 19 |   $2,598.00 |   $2,755.00 | 94%

AND SO ON

 

Here is the PBIX file as well as January's and February's spreadsheets: https://www.dropbox.com/s/tso4klsuw42dmez/MonthlyFTE.zip?dl=0

 

If anyone can help, I would be most appreciative.

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

 

In the absense of a Calendar Table, using Date and Time intelligence functions becomes difficult.  Those functions are required for computing YTD/cumulative figures.  To create a Calendar Table, we must first have a date column in the FTE Budget and Finances datasets.  Even if those datasets do not have a date column but only a Month and Year, we can always build a Date column and create a relationship from the Date column of those datasets to the Date column of the Calendar Table.  There is a lot of work to be done before your question can get answered.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Greg_Deckler
Super User
Super User

There's a lot going on there. See if my Time Intelligence the Hard Way provides some assistance for the cumulative stuff.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...

 

For showing the most current selected month, generally you use a measure that looks something along the lines of:

 

Measure = 
VAR __maxMonth = MAX('Table'[Month])
RETURN
SUMX(FILTER(ALL('Table'),[Month] = __maxMonth),[Value])

The first part gets the max value from your slicer and then uses that to filter down to those rows in your fact table. Your ALL overrides any context in the visual. You will likely have to have a disconnected slicer or table used as your slicer for this to work the way you want. This may cause problems with the cumulative values that you will need to correct.



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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.