Forum Discussion

Saxon10's avatar
Saxon10
Post Prodigy
5 years ago
Solved

POWER BI visualizations - multiple columns with different status in same report

 

Hi,

 

I have one report that contain multiple columns (Status 1 to status 7) with different status (Okay, Not Okay, Completed and Not completed), each columns has different count with different status.

 

Example; Status 1 has two different status which is "Okay" and "Not Okay", "Okay" count has 6039 and "Not okay" count has 13.

I summarised the data of each status for your reference. (Data prepared manually)

 

At the moment I am using 7 different charts, is there any way I can achieve my result all of them in one chart? Can you please suggested the best way to achieve the result in Power BI visualizations? Herewith attached the excel file for your additional reference.

 

https://www.dropbox.com/s/6cmuh32sit97rr1/POWER%20BI-VISUAL.xlsx?dl=0

  • Hello @Saxon10 ,

    Is the second screenshot the result of your desire?

    If yes, we suggest that you create a new status table and seven measures. See the following steps.

    1. Create a table with Enter Data.

    Po1.jpg

    2. Create seven measures and place them in a table visual.

    STATUS1 Measure = 
    CALCULATE(DISTINCTCOUNT(DATA[ITEM]),FILTER(DATA,DATA[STATUS1]=MAX('Table'[State])))+0
    

    Po2.jpg

    If you don't meet your requirements, could you show the exact expected result based on the table you shared?

    Best regards

    Community support team _ zhenbw

    If this post helps,then consider Accepting it as the solution to help other members find it faster.

    BTW, pbix as an attachment.

9 Replies

  • v-zhenbw-msft's avatar
    v-zhenbw-msft
    Community Support

    Hello @Saxon10 ,

    Is the second screenshot the result of your desire?

    If yes, we suggest that you create a new status table and seven measures. See the following steps.

    1. Create a table with Enter Data.

    Po1.jpg

    2. Create seven measures and place them in a table visual.

    STATUS1 Measure = 
    CALCULATE(DISTINCTCOUNT(DATA[ITEM]),FILTER(DATA,DATA[STATUS1]=MAX('Table'[State])))+0
    

    Po2.jpg

    If you don't meet your requirements, could you show the exact expected result based on the table you shared?

    Best regards

    Community support team _ zhenbw

    If this post helps,then consider Accepting it as the solution to help other members find it faster.

    BTW, pbix as an attachment.

    • Saxon10's avatar
      Saxon10
      Post Prodigy

      thanks for your time. This is exactly I am looking for.

    • aherabit's avatar
      aherabit
      Helper I

      This solution worked except for status values containing space characters. 

      In fact, it works on a small data sample but fails on large data feed.

       

      Any suggestions?

       

       

    • Saxon10's avatar
      Saxon10
      Post Prodigy

      Thanks for your reply. The above mentioned link not simpler to my case. Can you please advise regarding the summarise by column and count? 

  • AllisonKennedy's avatar
    AllisonKennedy
    Community Champion

    I would try using the first table you posted - then in Power Query Editor select Status 1 through Status 7, click Home tab > Unpivot Columns. You will now have three columns: ID, Attribute and Value (you can rename these as you wish). 

     

    Close and Apply the changes. 

     

    Create a new measure: 

    Distinct Count Items = DISTINCTCOUNT(Table[ID])

     

    Then create a visual with [Distrinct Count Items] in Values, [Attribute] in Axis and [Value] in Legend.

     

    Not sure if that will give you what you're looking for exactly, but you should be able to play around with the combinations from here.

    • Saxon10's avatar
      Saxon10
      Post Prodigy

      Hi. Thanks for your reply and suggestions. Those 7 status came from DAX function measure so unable to use the power query editor options.