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
slav84
Helper I
Helper I

Percent of total of day per status

Hello, 
I have a table that looks like this:

slav84_0-1667452853900.png

What I need to do is to calculate % of status of total for the day and plot it on stacked bar chart. 

So basically for 10-25th i would have

slav84_1-1667453068282.png

 

I tried doing this:

slav84_2-1667453131507.png

 but obviosuly thesenumbers are not correct. It is bar chart it showes by status however what is doing is taking %GT Count as percent of total of all data not as total of particular day. 

How do i fix this?

1 ACCEPTED SOLUTION
MahyarTF
Memorable Member
Memorable Member

Hi,

Please try the below code to create the measure and use it in your visuals :

% Of Total For 25th = DIVIDE(SELECTEDVALUE(Sheet249[Count]),
                             CALCULATE(sum(Sheet249[Count]),
                                       filter(all(sheet249),
                                              Sheet249[ReportDate] = SELECTEDVALUE(Sheet249[ReportDate])
                                            )
                                    )
                            )
MahyarTF_0-1667455242443.png

 

Appreciate your Kudos an please mark it as solution if it helps you

Mahyartf

View solution in original post

2 REPLIES 2
MahyarTF
Memorable Member
Memorable Member

Hi,

Please try the below code to create the measure and use it in your visuals :

% Of Total For 25th = DIVIDE(SELECTEDVALUE(Sheet249[Count]),
                             CALCULATE(sum(Sheet249[Count]),
                                       filter(all(sheet249),
                                              Sheet249[ReportDate] = SELECTEDVALUE(Sheet249[ReportDate])
                                            )
                                    )
                            )
MahyarTF_0-1667455242443.png

 

Appreciate your Kudos an please mark it as solution if it helps you

Mahyartf
Freeseman
Helper II
Helper II

You will need to make sure your value is decimal number in your transform table. Eg 

Freeseman_0-1667454305719.png

Then for example, click your field:

Freeseman_1-1667454365937.png

Column tools, select Percentage decimal 2 maybe?

Freeseman_2-1667454419958.png

And Result

Freeseman_3-1667454449932.png

 

 

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.