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
HanishR
Frequent Visitor

Removing Totals on filtered data

Hi all, 

I am trying to remove a total which is showing misleading information, 
When the data is filtered, or when it is not, the total columns marked below show the last Month / Quarter Total, 
Ideally I would like to hide that total until a month is selected, or alternatively by default show the current months data

 OUTLOOK_AE4DwhvMaZ.png

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @HanishR ,

 

How about create your Budget measure like so:

Budget = IF ( [Sales MTD] <> BLANK (), SUM ( 'Sales'[Budget] ) )

 

 

Best Regards,

Icey

 

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

10 REPLIES 10
Icey
Community Support
Community Support

Hi @HanishR ,

 

Does the expression above work?

 

 

Best Regards,

Icey

HanishR
Frequent Visitor

Yes, Thank you.
Icey
Community Support
Community Support

Hi @HanishR ,

 

It is best not to use quick measure. Create your measure like so:

MTD = TOTALMTD(SUM(Sales[Sales]),'Date'[Date])

 

Or just change your quick measure like so:

Sales MTD = 
IF(
	ISFILTERED('Date'[Date]),
	ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column."),
	TOTALMTD(SUM('Sales'[Sales]), 'Date'[Date]) ---------.[Date] is deleted.
)

 

Then, the total will show the value of max month if no specific month is selected.

mtd.PNG

BTW, .pbix file attached.

 

 

Best Regards,

Icey

 

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

 

HanishR
Frequent Visitor

@Icey Thank you for that, and I can see how it helps, but it doesn't remove the total of the Budget Sales MTD when both the sales MTDand budget sales MTD measures are set with the format you mentioned. 

Is there a way to only show the budget sales MTD if there is a Value in the Sales MTD? 


Icey
Community Support
Community Support

Hi @HanishR ,

 

How about create your Budget measure like so:

Budget = IF ( [Sales MTD] <> BLANK (), SUM ( 'Sales'[Budget] ) )

 

 

Best Regards,

Icey

 

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

amitchandak
Super User
Super User

@HanishR , if you have used If in your formula, try to change that to filter.

Or force row context like this

sumx(summarize(Table,Table[class], table[country],"_1",[Budget]),[_1])

 

Please Watch/Like/Share My webinar on Time Intelligence: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-Y...
My Your Tube Tips at: https://www.youtube.com/playlist?list=PLPaNVDMhUXGYrm5rm6ME6rjzKGSvT9Jmy

Appreciate your Kudos.

I have not used any formulas in this matrix,
it is purely sum of Budget
sum of sales
and then there's measures as needed for % of budget and % Growth.

@HanishR , These MTD, QTD, YTD are filter using relative date or some formula ?

Yes they are using the built in DAX measures MTD & QTD
With Base value being sales and date being date table

OUTLOOK_adIB7pn5Eu.png

 

That is my MTD Sales Formula

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.