Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Stacked bar chart help to use multiple values

I've 3 tables  Table - GroupData (GroupName, MaxCount)             WorkData(GroupName, HostName, CategoryName, Count, Date)             Calendar(Date, Year)   GroupData and WorkData are mapped 1...
  • v-gizhi-msft's avatar
    v-gizhi-msft
    6 years ago

    Hi,

     

    Please try to create this table first:

    Table = UNION(DISTINCT('WorkData'[Category]),{{"MaxCount"}})

    Then try this measure:

    Measure = SWITCH(SELECTEDVALUE('Table'[Category]),"MaxCount",MAX('GroupData'[MaxCount]),CALCULATE(SUM(WorkData[Count]),FILTER('WorkData','WorkData'[Category] in DISTINCT('Table'[Category]))))

    The result shows:

    Here is my changed pbix file:

    pbix 

     

    Best Regards,

    Giotto Zhi