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 Community,
I have a scenario in which I am replecating ATTR() Function of Tableau into power bi. I am using this measure
ATTR = VAR _dist = DISTINCTCOUNT('PAC Resanction Query'[Old PACs Filter])
return
IF(_dist > 1, "*", [_m_No. Of Resanctioned PACs])
And getting this below result that is fine. But the problem is I have 2 sub categories 0 and 1. and I just wanted 1's result.
This is the 0 and 1. Where we have 2 values I need * but where 0 is single I dont need that value. If 1 is single I need that value.
I need this type of end result.
I shall be very thankfull for any help.
Regards
@Amit Chandak
HI @Usman6400,
You can take a look at the following blog to know how to use filters to check current row context levels, then you can use the if statement with conditions to check records count values and replace them with different results.
Clever Hierarchy Handling in DAX - SQLBI
If you are confused about the coding formula, please share some dummy data to test:
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
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 |
---|---|
6 | |
3 | |
2 | |
2 | |
2 |