Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Measure to bar chart

Dear Friend 

i have  three columns PO number,vdl,qg doc as shown below, fourth column "VDL/QG column"  is dynamic Measure based on Slicer selection left side, 

if select=vdl then VDL/QG column=VDL column or select=QG docs then VDL/QG column=QG doc column

 

 

i want to display VDL/QG column(measure) to Bar Chart to show count of Available,Pending,Not require etc

is there any way to do or other

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Anonymous ,

    I created a sample pbix file(see attachment), please check whether that is what you want.

    1. Unpivot the column VDL and QG Doc in Power Query Editor

    = Table.Unpivot(#"Changed Type", {"VDL", "QG Doc"}, "Type", "Value")

    2. Create a bar chart visual

    Best Regards

4 Replies

  • rbriga's avatar
    rbriga
    Impactful Individual

    You can't use a measure as the axis, but you can create 3 measures:

    • "Available" = CALCULATE( COUNT (Table[PO NUMBER]), KEEPFILTERS ( [VDL /OG Column] = "Available"))
    • "Pending"
    • "Not required"

    And then you can show those on a bar chart.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Error occured:

      A function 'PLACEHOLDER' has been used in a True/False expression that is used as a table filter expression. This is not allowed.

      • rbriga's avatar
        rbriga
        Impactful Individual

        My bad! It's a measure, so let's try:

        • "Available" = CALCULATE( COUNT (Table[PO NUMBER]), FILTER(Table,  [VDL /OG Column] = "Available"))
  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    I created a sample pbix file(see attachment), please check whether that is what you want.

    1. Unpivot the column VDL and QG Doc in Power Query Editor

    = Table.Unpivot(#"Changed Type", {"VDL", "QG Doc"}, "Type", "Value")

    2. Create a bar chart visual

    Best Regards