Forum Discussion
Kuberkumark
4 years agoFrequent Visitor
Need Help with DAX Formula
Hi Community,
I need help with a Power BI Formula.
In the below expression there is a seperate value for A and B.
I want the expression to show Value of A for Apirl and B for May in the below Matrix under the value of May in the columns
Please help
3 Replies
- v-easonf-msftCommunity Support
Hi, Kuberkumark
You can consider using function 'SWITCH'.
Please try formula like:
May = VAR A = CALCULATE ( DISTINCTCOUNT ( TABLE[xxxx1] ), transaction_datails[Month] = "May" && transaction_datails[xxx2] = "SaleSuccess" && MONTH ( transaction_datails[min_Date] = 4 ) ) VAR B = CALCULATE ( DISTINCTCOUNT ( TABLE[xxxx1] ), transaction_datails[Month] = "May" && transaction_datails[xxx2] = "SaleSuccess" && MONTH ( transaction_datails[min_Date] = 5 ) ) RETURN SWITCH ( MatrixRowfield[Month], "April", A, "May", B )Best Regards,
Community Support Team _ Eason- KuberkumarkFrequent Visitor
v-easonf-msft Thank you for responding, this logic is not working.
- v-easonf-msftCommunity Support
Hi, Kuberkumark
Can you share a demo for further reseach?
Best Regards,
Community Support Team _ Eason