cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nirvana_moksh Established Member
Established Member

Matrix with different format for values

Hello All,

 

I am running into an issue wherein I am trying to create the below visual which is a matrix. In regards to the data, I have manipulated it by unpivoting the data and getting all 'Column Names' as listed below as Attributes, and all of their corresponding values in one single column of 'Values'. The problem of this is that I cannot format the % values as % and the $ values as $ or any other formatting as it all comes from 1 column now. Is there a better way to achieve this? I have tried unpivoting via Power Query and DAX, but this is so frustrating now

 

Column Names201820192020
DEPARTMENTS $  23,000.00 $  21,000.00 $  18,000.00
% GROWTH10%5%1.50%
SUM $    5,000.00 $  98,000.00 $    8,798.00
PROFIT $    2,100.00 $    1,400.00 $        900.00
LOSS $        300.00 $        200.00 $        100.00
Earnings Before Tax $        150.00 $        120.00 $        110.00

 

 

image.png

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Matrix with different format for values

HI, @nirvana_moksh 

You could use FORMAT Function to custom format it 

Measure = IF(SELECTEDVALUE('Table'[Attribute])="%GROWTH", FORMAT(CALCULATE(SUM('Table'[Value])),"Percent"),FORMAT(CALCULATE(SUM('Table'[Value])),"Currency"))

Result:

12.JPGBefore13.JPGAfter

and here is pbix file, please try it.

 

Best Regards,

Lin

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

View solution in original post

1 REPLY 1
Community Support Team
Community Support Team

Re: Matrix with different format for values

HI, @nirvana_moksh 

You could use FORMAT Function to custom format it 

Measure = IF(SELECTEDVALUE('Table'[Attribute])="%GROWTH", FORMAT(CALCULATE(SUM('Table'[Value])),"Percent"),FORMAT(CALCULATE(SUM('Table'[Value])),"Currency"))

Result:

12.JPGBefore13.JPGAfter

and here is pbix file, please try it.

 

Best Regards,

Lin

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

View solution in original post

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Users Online
Currently online: 294 members 2,868 guests
Please welcome our newest community members: