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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
JustinDoh1
Post Prodigy
Post Prodigy

Trying to write Explicit Measure to calculate Percentage ( A / Total) in a new column

I am sharing my Pbix file here.

 

This is a similar issue that I had last two days, but I need some advice regards to creating explicit measure on data first in order to solve the issue. 

 

I have a data set (table) that has two columns as shown below:

JustinDoh1_0-1633459049426.png

I am trying to come up with percentage of Product A / total for different client.

 

So far, I have a matrix shown as below:

JustinDoh1_1-1633459160096.png

Matrix has following data structure:

JustinDoh1_3-1633459613597.png

 

 

I would like to have another column next to Total that has a percenage of Product A / Total:

JustinDoh1_2-1633459395232.png

I have a measure that calculates percentage but, it only goes under Values, not Columns:

% Product A =
DIVIDE
( CALCULATE ( COUNT ( Data[Client_ID] ),
Data[Product Type] IN { "Product A" } ),
 
CALCULATE ( COUNT ( Data[Client_ID] ), REMOVEFILTERS ( Data[Product Type] ) ) )

 

JustinDoh1_4-1633460190465.png

 

 

 

My question is:

How do I create Explicit mesure from my data set in order to have Percentage value shown as another column in Matrix?

 

Thanks.

 

 

 

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please check the below picture and the sample pbix file.

All measures are in the sample pbix file.

 

Picture1.png

 

Link to the sample pbix file 

 

 

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

2 REPLIES 2
JustinDoh1
Post Prodigy
Post Prodigy

@Jihwan_Kim Thank you Jihwan. You are great! Appreciated.

Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please check the below picture and the sample pbix file.

All measures are in the sample pbix file.

 

Picture1.png

 

Link to the sample pbix file 

 

 

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.