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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
mkasinathan1
Frequent Visitor

DAX Calculation showing incorrect result for Totals in Smart Narrative Visual

Hi Team,

We are trying to evaluate Totals for simple data set using DAX Expression and show them in Tooltips for our visuals. The DAX Seems to be giving correct result while looking at default PBI tooltip. But while looking at Smart Narrative Tooltip, the totals are returning different numbers for Multi-selection in Filters.

 

DataSet:

GradeDeptValue
A1001
B1004
B1011
C1002
C1014
D1001
D1011
E1005
A1022
B1023
C1024
D1025
E102

6

 

DAX Expression to Calculate Totals

Totals = CALCULATE(SUM(Sheet1[Value]), REMOVEFILTERS(Sheet1[Grade]))
 
The Grade totals must be returning value 19. It is giving correct value 19 from Direct table or default tooltip. However from Smart Narrative page(Tooltip), it is giving wrong result as shown in image. This is because Grades- A & E are not part of Department(Filter) and hence those records are not getting included in Totals. It looks like DAX Calculation is getting executed separately for each filter selection- 100 and then 101 and then Totals is evaluated.
How to bring the same totals for all Grade even though a respective grade is missed out for certain departments?
 
mkasinathan1_0-1661762226802.png

 

Thanks,

Muthu

7 REPLIES 7
mkasinathan1
Frequent Visitor

Hi Amit,
We have a slicer to be considered in the calculation. The above calculation will remove all filters from the context.  Please help me with revised logic that considers selected Filters/slicers and display totals only based on selection.

tamerj1
Community Champion
Community Champion

Hi @mkasinathan1 
This happens due to Auto-Exist Feature in Power Bi. You can find many artiles and videos about it. Here is one for your reference if you are aintersted AutoExist and Normalization - SQLBI

Long story short, use a dimention table to slice by Department. Please follow the following steps and arrached sample file. 

1.png2.png4.png

Hi,
Is it possible to handle the issue using DAX expression instead of making changes to data model?

The reason i'm asking you this is because, we have plenty of slicers in our real time reports and we are in the verge of moving changes to Production. Making changes to data model at this phase would be difficult for us to re-validate all metrics/data points now.

 

Appreciate if you could help me with your expertise on this.

@mkasinathan1 

Adding a disconnected local single column table to your data model is not considered as "changing the data model". Changing the column in each slicer will take 5 seconds per slicer. Even if there is another way around it could be complex and you never know when and where other errors will appear. 

Anonymous
Not applicable

Hi,


My initial thought is: would it work if you changed your totals calculation to be using some form of the "count" formula instead? 

Hi,
When you mean some counts, can you please help me with the formula?

amitchandak
Super User
Super User

@mkasinathan1 , Try this in tooltip page

 

Totals = CALCULATE(SUM(Sheet1[Value]), REMOVEFILTERS(Sheet1))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.