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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
MacJasem
Helper III
Helper III

Need help with a DAX measure issue, that doesn't filter correctly.

hi Guys/Girls

I've got a measure [FilteredTotal] & [Total], and i'd like to create a measure that returns the value from [Total] when the filter is active on the page, or else if filte is not active return the value for [FilteredTotal]. 

ConditionalTotal =
IF (
    ISFILTERED(ChartOfAccounts[Name]),
    [Total],
    [FilteredTotal]
)
but this doesn't really work, because the value for [Total] still shows when no filter is chosen. 

what might be the problem? please ask if you need more info to answer/help
5 REPLIES 5
v-shex-msft
Community Support
Community Support

Hi @MacJasem,

Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
some_bih
Super User
Super User

Hi @MacJasem you put filter on account Finance[Account_No] > 1000, this cause this unexpected calculation. Is this what you want?

On visual you can exclude subtotal for rows / columns.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






yes this is intended because this is the only difference between Total and FilteredTotal measures, so i want to switch between those two measures depending on the filter choice

some_bih
Super User
Super User

Hi @MacJasem it must be something about one of your measure definition.

I guess you want to controll some subtotal/total in table /matrix. If yes, when you need to workout your measure. Hope this help kudos appreciated.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Thanks @some_bih for the feedback

 

the two measures that i want to switch between are:

Total =  SUM ( Finance[Sum_Amount] )

and
 
FilteredTotal = SUMX(FILTER(Finance, Finance[Account_No] > 1000), Finance[Sum_Amount])

I really can't seem to figure out what the issue is. 

I have a clustered column chart as the visual where i'd want the measure to switch between the result of the above two measures.

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

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