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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Astronomique
Helper I
Helper I

DIfferent types of Units in one column (Matrix) Help

Dear all,

 

I have an issue with the formatting of the units. I currently have a matrix with two levels of headers and one column as a value :

 

Astronomique_1-1616513386917.png

 

I obtained it by unpivoting in Power query my data then use a matrix visual.

 

Astronomique_0-1616513171515.png

 

I'm pretty happy about the outcome of the visual as it is doing what i want, however as you can see some columns are meant to be in percentage not value, but as far as i know i can only choose one type per value, so that's mean it's either a whole number or percentage...

 

Is there any way to do custom type formatting according to the attribute of the value ?

i.e : have whole number for some columns and percentage for others ?

 

Let me know if you need additional information.

 

Thanks in advance for your help.

 

Best regards.

 

Astronomique.

 

 

 

1 ACCEPTED SOLUTION
Astronomique
Helper I
Helper I

I found a work around :

 

Astronomique_0-1616521878196.png

 

By using a switch and a calculated column :

 

 

 

Value Formatted = SWITCH (
    TRUE (),
    [Attribute] = "% Received" , FORMAT('Follow-up'[Value]*100, "0")&" %",
    [Attribute] = "% projected", FORMAT('Follow-up'[Value]*100, "0")&" %",
    FORMAT(INT([Value]),"#")
)

 

 

 

Now i need to sort out how to manage conditionnal formatting on colors ... Wish me good luck

View solution in original post

6 REPLIES 6
Astronomique
Helper I
Helper I

I found a work around :

 

Astronomique_0-1616521878196.png

 

By using a switch and a calculated column :

 

 

 

Value Formatted = SWITCH (
    TRUE (),
    [Attribute] = "% Received" , FORMAT('Follow-up'[Value]*100, "0")&" %",
    [Attribute] = "% projected", FORMAT('Follow-up'[Value]*100, "0")&" %",
    FORMAT(INT([Value]),"#")
)

 

 

 

Now i need to sort out how to manage conditionnal formatting on colors ... Wish me good luck

negi007
Community Champion
Community Champion

@Astronomique you can create seperate measure that you want to show in the column and then define format for each measure as per your requirements.




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



Proud to be a Super User!


Follow me on linkedin

Yes that was a work around but in my case i wanted to keep the hierachy of the headers.

 

So far by unpivoting two times: i have two values : 1 for whole numbers and one for percentage.

 

But the headers are not looking good i have :

 

TOP HEADER

Header A             |      Header B

value A value B        value A value B

 

When i would like to have 

 

TOP HEADER

Header A | Header B

 

Value A     Value B

 

is there anyway to work around with a measure and a switch() ?

I tried to use a calculated column to do that but apparently it gives back " you cannot yield data format in a calculated column

 

If you have any other ideas, let me know. I am still searching for a solution on my own.

 

 

 

amitchandak
Super User
Super User

Hi thanks for your link. 

 

i had that idea of switch but so far does not work for a calculated column. trying to use it in a measure.

Will keep you updated.

Astronomique_0-1616520097008.png

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.