Forum Discussion
garridog
7 years agoNew Member
Filter with two different measures
Hi, hope you can help me out. I have 2 different measures, one that counts the rows from a table containing light objects, and another one that counts in a different table the heavy ones; so I want ...
- 7 years ago
Hi garridog ,
Here we can create a measure as below.
Measure = var _sele = SELECTEDVALUE('Table'[Type]) var light = COUNTROWS(V_Light) var heavy = COUNTROWS(V_heavy) return IF(_sele = "light",light,IF(_sele= "heavy",heavy,light+heavy))Then we can get the result based on the value in slicer.
For more details, please check the pbix as attached.
Regards,
Frank
v-frfei-msft
7 years agoCommunity Support
Hi garridog ,
Here we can create a measure as below.
Measure = var _sele = SELECTEDVALUE('Table'[Type])
var light = COUNTROWS(V_Light)
var heavy = COUNTROWS(V_heavy)
return
IF(_sele = "light",light,IF(_sele= "heavy",heavy,light+heavy))
Then we can get the result based on the value in slicer.
For more details, please check the pbix as attached.
Regards,
Frank
- garridog7 years agoNew Member
Hi v-frfei-msft , thanks for your reply it worked like a charm.