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

Visualize the following data efficiently

I have the following data:

 

Name of the projectReason 1Reason 2Reason 3Reason 4Reason 5Reason 6Reason 7
AminoYes No YesYesNoYesNo
AminoNoYesNoYesYesNoYes
BashYesNoYesNoNoYesNo
TrashYesNoNoYesYesNoYes

 

How do I effectively and efficiently visualise the above table especially when I want to Identify the number of Yes and Nos for each reason per project?

3 REPLIES 3
v-luwang-msft
Community Support
Community Support

Hi @Novice_ ,

Has your problem been solved, if so, please consider Accept a correct reply as the solution to help others find it.

 

Best Regards

Lucien

v-luwang-msft
Community Support
Community Support

Hi @Novice_ ,

Final showing like below:

v-luwang-msft_0-1621579870212.png

 

Use the following dax to create new column:

Count_Yes = 
VAR test1 =
    IF ( 'Table'[Reason 1] = "Yes", 1, 0 )
VAR test2 =
    IF ( 'Table'[Reason 2] = "Yes", 1, 0 )
VAR test3 =
    IF ( 'Table'[Reason 3] = "Yes", 1, 0 )
VAR test4 =
    IF ( 'Table'[Reason 4] = "Yes", 1, 0 )
VAR test5 =
    IF ( 'Table'[Reason 5] = "Yes", 1, 0 )
VAR test6 =
    IF ( 'Table'[Reason 6] = "Yes", 1, 0 )
VAR test7 =
    IF ( 'Table'[Reason 7] = "Yes", 1, 0 )
RETURN
    test1 + test2 + test3 + test4 + test5 + + test6 + test7
Count_No = 
VAR test1 =
    IF ( 'Table'[Reason 1] = "No", 1, 0 )
VAR test2 =
    IF ( 'Table'[Reason 2] = "No", 1, 0 )
VAR test3 =
    IF ( 'Table'[Reason 3] = "No", 1, 0 )
VAR test4 =
    IF ( 'Table'[Reason 4] = "No", 1, 0 )
VAR test5 =
    IF ( 'Table'[Reason 5] = "No", 1, 0 )
VAR test6 =
    IF ( 'Table'[Reason 6] = "No", 1, 0 )
VAR test7 =
    IF ( 'Table'[Reason 7] = "No", 1, 0 )
RETURN
    test1 + test2 + test3 + test4 + test5 + + test6 + test7
Count_No = 
VAR test1 =
    IF ( 'Table'[Reason 1] = "No", 1, 0 )
VAR test2 =
    IF ( 'Table'[Reason 2] = "No", 1, 0 )
VAR test3 =
    IF ( 'Table'[Reason 3] = "No", 1, 0 )
VAR test4 =
    IF ( 'Table'[Reason 4] = "No", 1, 0 )
VAR test5 =
    IF ( 'Table'[Reason 5] = "No", 1, 0 )
VAR test6 =
    IF ( 'Table'[Reason 6] = "No", 1, 0 )
VAR test7 =
    IF ( 'Table'[Reason 7] = "No", 1, 0 )
RETURN
    test1 + test2 + test3 + test4 + test5 + + test6 + test7
Reason_No = 
VAR test1 =
    IF ( 'Table'[Reason 1] = "No", "Reason 1", BLANK() )
VAR test2 =
    IF ( 'Table'[Reason 2] = "No", "Reason 2", BLANK() )
VAR test3 =
    IF ( 'Table'[Reason 3] = "No", "Reason 3", BLANK() )
VAR test4 =
    IF ( 'Table'[Reason 4] = "No","Reason 4", BLANK() )
VAR test5 =
    IF ( 'Table'[Reason 5] = "No", "Reason 5", BLANK() )
VAR test6 =
    IF ( 'Table'[Reason 6] = "No", "Reason 6", BLANK())
VAR test7 =
    IF ( 'Table'[Reason 7] = "No", "Reason 7", BLANK())
RETURN
    test1&" "&test2&" "&test3&" "&test4&" "&test5&" "&test6&" "&test7

 

 

You could download my pbix flie if you need.

 

Wish it is helpful for you!

 

Best Regards

Lucien

amitchandak
Super User
Super User

@Novice_ , My advice would be unpivoting all the reason columns

https://radacad.com/pivot-and-unpivot-with-power-bi
Transpose : https://yodalearning.com/tutorials/power-query-helps-transposing-data/

 

Then reason would also be a column. ANd you can use matrix for similar display with max of value

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.