Reply
Highlighted
Member
Posts: 150
Registered: ‎01-21-2018

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

Super User
Posts: 10,605
Registered: ‎07-11-2015

Re: Custom Totals in Matrix table (SUMX, HASONEVALUE)

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


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

Proud to be a Datanaut!


Member
Posts: 150
Registered: ‎01-21-2018

Re: Custom Totals in Matrix table (SUMX, HASONEVALUE)

@Greg_Deckler

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


Regards

Community Support Team
Posts: 4,051
Registered: ‎07-09-2016

Re: Custom Totals in Matrix table (SUMX, HASONEVALUE)

@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.
Member
Posts: 150
Registered: ‎01-21-2018

Re: Custom Totals in Matrix table (SUMX, HASONEVALUE)

@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

Member
Posts: 150
Registered: ‎01-21-2018

Re: Custom Totals in Matrix table (SUMX, HASONEVALUE)

@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