March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi everybody,
I'm looking for help regarding DAX measure for combinevalues or concatenate text, based on slicer.
I wrote this measure that works well, for one of the criterias, but for others not really.
Measure = IF(ISFILTERED(tst[Race]), COMBINEVALUES(" ", "There are", SUM(tst[num]), SELECTEDVALUE(tst[Race]), SELECTEDVALUE(tst[Profession])), SUM(tst[num]))
In the first picture, it works fine, as I have selected just a race. As soon as I selected to races, it doesnt display the races of the profession (2nd photo). I would like it to show, there are 5 caucasian and asian teacher. Any idea guys why my measure is not working properly? I truly appreciate your help.
Solved! Go to Solution.
Hi edoyak,
Modify your DAX formula like this:
Measure = IF(ISFILTERED(tst[Race]), COMBINEVALUES(" ", "There are", SUM(tst[num]), CONCATENATEX(tst, CALCULATE(MIN(tst[Race]), ALLSELECTED(tst[Race])), " and "), SELECTEDVALUE(tst[Profession])), SUM(tst[num]))
Regards,
Jimmy Tao
Hi edoyak,
Modify your DAX formula like this:
Measure = IF(ISFILTERED(tst[Race]), COMBINEVALUES(" ", "There are", SUM(tst[num]), CONCATENATEX(tst, CALCULATE(MIN(tst[Race]), ALLSELECTED(tst[Race])), " and "), SELECTEDVALUE(tst[Profession])), SUM(tst[num]))
Regards,
Jimmy Tao
I tried your solution and it works. thank you. But before this, I used Variables and it worked perfectly well for my situation because I had a lot more slicers and nested if's would've been a pain in the a**. Thanks a lot. I would refer to this solution in the future.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
86 | |
76 | |
57 | |
52 |
User | Count |
---|---|
201 | |
137 | |
108 | |
73 | |
68 |