Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Dax Measure for Range

Hi Any DAX Expertise Here?   My Access Count is a count column from my data source. May I ask any DAX measure that I can use to filter out   Access Count >10 Access Count <0 Access Count >5 & ...
  • v-xicai's avatar
    v-xicai
    7 years ago

    Hi Anonymous ,

     

    You can create Range table via "Enter Data" under Home ribbon.

     

     

     

     

    Then create column Range Judge to judge range, or you may create column Range Judge1 which won't need the Range table.

     

     

    Range Judge = CALCULATE(VALUES(Range[Access Count range]),FILTER(Range,Table1[Access Count]>=Range[Min]&&Table1[Access Count]<=Range[Max]))

     

    Range Judge1 = SWITCH(TRUE(),Table1[Access Count]<=0,"Count of Login <= 0",Table1[Access Count]>0&&Table1[Access Count]<=5,"Count of Login > 0 & <= 5",Table1[Access Count]>5&&Table1[Access Count]<=10,"Count of Login >5 & <= 10",Table1[Access Count]>10,"Count of Login >10")

     

     

     

     

     

     

    Here is my test pbix: https://community.powerbi.com/t5/Desktop/Dax-Measure-for-Range/m-p/689458#M332430

     

    Best Regards,

    Amy

     

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