Forum Discussion

TechR21's avatar
TechR21
Helper V
3 years ago
Solved

Dynamic measure as filter in chart

Hi,   I have the following sample data and visuals:   columns: - group - version - class - number   Each group has the same versions, and classes in that version. So for example version "1-...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi TechR21 ,

     

    According to your description, here are my steps you can follow as a solution.

    (1) My test data is the same as yours.

    (2) We can create a table and a measure. 

    Table = {"a. 100%","b. 100% to 99%","c. 99% to 90%","d. 90% to 75%","e. 75% to 0 %","f. 0%"}
    Measure = 
    
    var _a = SUMMARIZE('Data',Data[Version],'Data'[Class],"CA",if(AVERAGE(Data[Number])=1 ,"a. 100%",
    
                            if(AVERAGE(Data[Number])<1 && (AVERAGE(Data[Number])>=0.99),"b. 100% to 99%",
    
                            if(AVERAGE(Data[Number])<0.99 && (AVERAGE(Data[Number])>=0.9),"c. 99% to 90%",
    
                            if(AVERAGE(Data[Number])<0.9 && (AVERAGE(Data[Number])>=0.75),"d. 90% to 75%",
    
                            if(AVERAGE(Data[Number])<0.75 && (AVERAGE(Data[Number])> 0 ),"e. 75% to 0 %",
    
                            "f. 0%"                
    
            ))))))
    
    return COUNTX(FILTER(_a,[CA]=SELECTEDVALUE('Table'[Cat])),[CA])

     

    (3) Then the result is as follows.

     

    If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

     

    Best Regards,

    Neeko Tang

    If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly.