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
gourangshah24
Frequent Visitor

Request to assit with static first row as numbers and remaining rows to be % of grand total

Hi Powerbi users,

Greetings !!!

 

I am faced with a unique challenge and not sure if I can find a solution in PowerBI desktop. I have the following table in excel:

 

Actual Data
Audit compliancesMay-19Jun-19Jul-19
 No. of CC Audits139177126
1. No Transactions11254
2. 0% Compliant345617
3. > 50% Compliant192116
4. 50 <> 99% Compliant574364
5. 100% Compliant183225
% of Grand Total139177126

 

Now, I need to keep the first row static i.e. to show it as numbers, thereafter from 2nd row onwards, i need to have the number converted to % of grand total as below:

 

Data expected from PowerBI
Audit compliancesMay-19Jun-19Jul-19
 No. of CC Audits139177126
1. No Transactions8%14%3%
2. 0% Compliant24%32%13%
3. > 50% Compliant14%12%13%
4. 50 <> 99% Compliant41%24%51%
5. 100% Compliant13%18%20%
% of Grand Total100%100%100%

 

The result that i am getting from doing % of power bi is as under:Audit_Data_Error.jpg

 

It would be great if anyone can share a solution with the query to the above.

 

Regards,

Gourang shah

 

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@gourangshah24 

 

You may refer to the measure below.

Measure =
SWITCH (
    SELECTEDVALUE ( 'Table'[Audit compliances] ),
    BLANK (), "100%",
    "No. of CC Audits", [Count],
    FORMAT (
        DIVIDE (
            [Count],
            CALCULATE (
                [Count],
                'Table'[Audit compliances] = "No. of CC Audits"
            )
        ),
        "0%"
    )
)

 

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.

View solution in original post

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@gourangshah24 

 

You may refer to the measure below.

Measure =
SWITCH (
    SELECTEDVALUE ( 'Table'[Audit compliances] ),
    BLANK (), "100%",
    "No. of CC Audits", [Count],
    FORMAT (
        DIVIDE (
            [Count],
            CALCULATE (
                [Count],
                'Table'[Audit compliances] = "No. of CC Audits"
            )
        ),
        "0%"
    )
)

 

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.
amitchandak
Super User
Super User

You need to create a sort sequence for column Audit compliances and mark that as sort column for this column and then sort on Audit compliances. It will do it.

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

 

Sort Month.pngSort_by_column.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.