Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Attribute Function From Tableau to Power bi.

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])
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. pic2.PNG
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.
PIC3.PNGI need this type of end result.

PIC1.PNGI shall be very thankfull for any help.


@Amit Chandak

Frequent Visitor

Could you please look into it.

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 


Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Join Arun Ulag at MPPC23

Join Arun Ulag at MPPC23

Get a sneak peek into this year's Power Platform Conference Keynote.

PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!