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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Removing total value in report

How can I remove total value in  report with following dax code:

 

select_identity:=

Var identity = CALCULATE(FIRSTNONBLANK(VALUES('identity'[identity description]);1))
Var identitydb= CALCULATE(FIRSTNONBLANK(VALUES('identitydb'[identitydb description]);1))

Var Result= SWITCH(
TRUE();

identity = Blank();identitydb;
identity 
)

Return IF(HASONEVALUE('Fact_table'[identitykey]) && HASONEVALUE('Fact_table'[identitydbKey]);Result;BLANK())

 

I've changed columnname.

I've two dimension tables (identity och identitydb) which has relation to fact table(Fact_table). If one of columns 'identity description' and 'identitydb description' is null it will return the value of the other. It works fine if one of them is null but it doesn't work when both of them has value and shows value in total in report. 

 

1 ACCEPTED SOLUTION
PaulDBrown
Community Champion
Community Champion

@Anonymous 

You can use ISINSCOPE for this.

The measures I'm using in this example are:

1) your calculation

Switch = 
VAR Identity = MAX('Sample'[Identity])
VAR dbident = MAX('Sample'[Indetitydb])
RETURN
IF(
ISBLANK(Identity),
dbident,  
Identity)

2) Measure to remove total:

Remove total = IF(ISINSCOPE('Sample'[Index]), [Switch])

 

To get his:

result.JPG

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

6 REPLIES 6
PaulDBrown
Community Champion
Community Champion

@Anonymous 

You can use ISINSCOPE for this.

The measures I'm using in this example are:

1) your calculation

Switch = 
VAR Identity = MAX('Sample'[Identity])
VAR dbident = MAX('Sample'[Indetitydb])
RETURN
IF(
ISBLANK(Identity),
dbident,  
Identity)

2) Measure to remove total:

Remove total = IF(ISINSCOPE('Sample'[Index]), [Switch])

 

To get his:

result.JPG

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






amitchandak
Super User
Super User

@Anonymous , you want to remove always or any ?

Return IF(HASONEVALUE('Fact_table'[identitykey]) || HASONEVALUE('Fact_table'[identitydbKey]);Result;BLANK())

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
Anonymous
Not applicable

Thank you @amitchandak  I want to remove it always, in the following screenshot I want to remove 'Fabric chocolate AB in Total row:

 

22.PNG

 

I tested with '||' but it still returns the value and shows 'identity discription' in Total row.

@Anonymous , I think this how be driven by is there in row or matrix or table. Are these two columns are also in the row of matrix/table

 

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
Anonymous
Not applicable

@amitchandak 

It's a simple table in report .

Yes, the column is in the table (in report) and the column name is 'Identity description' and depending to which one ('identity' or 'identitydb') is NULL it would show value to the one which is not NULL.

@Anonymous Did @PaulDBrown 's suggestion work? Seems like the way to go.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors