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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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