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
Anonymous
Not applicable

Help with data conversion

I have data that is structured like this in Power BI (obviously this is an excel screenshot)

SIF Expectation Compliance.jpg

 

I want to show a table summary of all the column headers as a % of x/(x+✔)

So for instance SL03 in the table above would be 43% i.e. 3/7

And display like this

SIF Expectation Compliance - Requirement.jpg

 

Thanks for any help

1 ACCEPTED SOLUTION
PattemManohar
Community Champion
Community Champion

@Anonymous  Guess, you are looking for something like this....

 

Sample DataSample Data

 

Unpivot the columns in Power Query Editor and then your table looks like (You can see the actual tick mark symbols in Power BI, converted them using UNICODE function)

 

image.png

 

Create a summarized table as below using New Table option (Added few more fields for reference)

 

Test241Out = SUMMARIZECOLUMNS(
                Test241SpecialSymbols[Item],"Total",COUNTROWS(Test241SpecialSymbols),
               "Not NA",COUNTROWS(FILTER(Test241SpecialSymbols,Test241SpecialSymbols[Value]<>"N/A")),
               "Right",COUNTROWS(FILTER(Test241SpecialSymbols,UNICODE(Test241SpecialSymbols[Value])=0252)),
               "Wrong",COUNTROWS(FILTER(Test241SpecialSymbols,Test241SpecialSymbols[Value]="X"))
               )

Add a new column which is your expected output and change the format to Percentage

 

%Compliance = Test241Out[Right]/Test241Out[Not NA]

image.png





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

Proud to be a PBI Community Champion




View solution in original post

2 REPLIES 2
PattemManohar
Community Champion
Community Champion

@Anonymous  Guess, you are looking for something like this....

 

Sample DataSample Data

 

Unpivot the columns in Power Query Editor and then your table looks like (You can see the actual tick mark symbols in Power BI, converted them using UNICODE function)

 

image.png

 

Create a summarized table as below using New Table option (Added few more fields for reference)

 

Test241Out = SUMMARIZECOLUMNS(
                Test241SpecialSymbols[Item],"Total",COUNTROWS(Test241SpecialSymbols),
               "Not NA",COUNTROWS(FILTER(Test241SpecialSymbols,Test241SpecialSymbols[Value]<>"N/A")),
               "Right",COUNTROWS(FILTER(Test241SpecialSymbols,UNICODE(Test241SpecialSymbols[Value])=0252)),
               "Wrong",COUNTROWS(FILTER(Test241SpecialSymbols,Test241SpecialSymbols[Value]="X"))
               )

Add a new column which is your expected output and change the format to Percentage

 

%Compliance = Test241Out[Right]/Test241Out[Not NA]

image.png





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

Proud to be a PBI Community Champion




Anonymous
Not applicable

Thankyou.

 

The unpivot was the key I was missing.

 

Really appreciate it.

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.