Forum Discussion
Anonymous
4 years agoNot applicable
Need Help on Dax
I have table with below columns with like this 2018 Year-End Marker 2019 Year-End Marker 2020 Year-End Marker HM MM MH MM HM MM HM MH HM HM MM MM ML LL LM MM L...
- 4 years ago
Hi Anonymous
Use the below measure:
if(SELECTEDVALUE(Dim_Date[Year])="2021",CALCULATE(COUNT('Sample'[2020 Year-End Marker]), 'Sample'[2020 Year-End Marker] in {"HH","HM","MH"}),if(SELECTEDVALUE(Dim_Date[Year])="2020",CALCULATE(COUNT('Sample'[2020 Year-End Marker]), 'Sample'[2019 Year-End Marker] in {"HH","HM","MH"}),"_"))and make sure that the Year Column has Text datatype.Mark this as a solution, if I answered your question. Kudos are always appreciated.Thanks
Tanushree_Kapse
Impactful Individual
4 years agoHi Anonymous
Use the below measure:
if(SELECTEDVALUE(Dim_Date[Year])="2021",CALCULATE(COUNT('Sample'[2020 Year-End Marker]), 'Sample'[2020 Year-End Marker] in {"HH","HM","MH"}),if(SELECTEDVALUE(Dim_Date[Year])="2020",CALCULATE(COUNT('Sample'[2020 Year-End Marker]), 'Sample'[2019 Year-End Marker] in {"HH","HM","MH"}),"_"))
and make sure that the Year Column has Text datatype.
Mark this as a solution, if I answered your question. Kudos are always appreciated.
Thanks