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
pbrainard
Helper III
Helper III

Format for filtered measure

I have five divisions each with $5955.20 to spend of a total budget of $29776.00. 

Division 1

Division 2

Division 3

Division 4

Division 5

 

I have a division slicer on my report. I have a card that shows how much was spent of the total (29,776) (sum of purchases) and another card showing how much is left (29776 minus total purchases). When someone chooses a division in the slicer, currently the 'how much was spent' card will show the total of that division's purchases, but the 'how much is left' card still shows total left of the total amount. I want another card that shows how much of their allotted $5955.20 a division has left when filtered by the slicer, or total left if no slicer selection.

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @pbrainard 

 

Please try the following methods.

Measure:

Slicer = 
IF (
    SELECTEDVALUE ( 'Table'[Division] ) <> BLANK (),
    SELECTEDVALUE ( 'Table'[Budget] ) - SELECTEDVALUE ( 'Table'[sum of purchases] ),
    SUM ( 'Table'[Budget] ) - SUM ( 'Table'[sum of purchases] )
)

vzhangti_0-1653375033605.pngvzhangti_1-1653375049929.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

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

3 REPLIES 3
v-zhangti
Community Support
Community Support

Hi, @pbrainard 

 

Please try the following methods.

Measure:

Slicer = 
IF (
    SELECTEDVALUE ( 'Table'[Division] ) <> BLANK (),
    SELECTEDVALUE ( 'Table'[Budget] ) - SELECTEDVALUE ( 'Table'[sum of purchases] ),
    SUM ( 'Table'[Budget] ) - SUM ( 'Table'[sum of purchases] )
)

vzhangti_0-1653375033605.pngvzhangti_1-1653375049929.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Tweaked it just a tad, but works like a charm!!! Thank you kindly!

 

Slicer =
IF (
SELECTEDVALUE ( 'Digital Equity Reporting'[Division (groups)] ) <> BLANK (),
5955.20 - SUM ( 'Digital Equity Reporting'[Amount Spent] ),
SUM ( GrantTotal[Amount] ) - SUM ( 'Digital Equity Reporting'[Amount Spent])
)
speedramps
Super User
Super User

Please can you provide example input data in a table(s) format and not a screen shot. Thank you

 

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.