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
vmakhija
Post Prodigy
Post Prodigy

Custom Totals in Matrix table (SUMX, HASONEVALUE)

Hello All
I have some DAX related question.


Let me explain my scenario - I have a matrix table which shows companies data (each company has its data in different currency) and there is a measure which is dynamically showing data in USD for each company

At the total level for matrix, the totals are inaccurate as currency conversion at total level is not relevant as such.
So I am using SUMX to do the totals for all the companies - i.e. each company's USD converted number will add up together to show the total.
Its fine till here.

 

However, what I am using here is HASONEVALUE function to check if I am at company level or total level and use SUM or SUMX based on that.
But if in case my user removes company code and lets say puts a different field, then my measure will fail as it is checking HASONEVALUE for company code only and not the new field just added by user.

 

Have any of you encountered this or have any suggestions?

 

Regards

5 REPLIES 5
Greg_Deckler
Super User
Super User

So the users have access to edit your report? How are you sharing the reports via the Service or Desktop?


@ 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!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler

Yes, my users have edit access to the report. I am sharing the report via Service.


Regards

@vmakhija,

 

As far as I know, you'll need to rewrite the measure. By the way, you may take a look at ISINSCOPE.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-chuncz-msft

you mean write multiple measures, right?

I think ISINSCOPE will have the same shortcomings as what HASONEVALUE has in my scenario.

 

Regards

@v-chuncz-msft Any further inputs or ideas on this? I am actually stuck on this and don't have further ideas on how to proceed ahead. Regards

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.