Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi PowerBI Community,
I am facing a challenge with a DAX formula. I currently have an Excel formula, which I have included screenshot below. The formula is an IF(CountIF) formula. Essentially, I have a column in Excel where some values are repeated, and I intend to display unique values as 1, but when there is a duplicate value, I want to display 0. You can see an example below.
Now, I have the same column in Power BI, and I'd like to use DAX (preferably a calculated column) to achieve the same result. I have made an attempt using differnet approached but failed..
Is there a way to achieve this in Power BI? if yes could you please guide. I have same column names in powerBI
Solved! Go to Solution.
Hi @awsiya
Add index column via PQ
and modify the formula to :
It worked. Thank you so very much.
Hi @Ritaf1983 . Thank you for giving solution. But it should show True to at least one of the duplicates. e., if I have two or three (let us assume 3) values that are identical, it shoudl reflect at least 1 true and mark the rest of the duplicates false. If you look at my orginal excel sheet that is exactly what excel formula had done. If there is set of 2 duplicataes, it will mark one true (1) and one false (0). with the formula that you provided, it surely is giving me true for the individual values but also giving me false to all other duplicates. Please see my screenshot of excel i have explained in little more detail what I wanted. I would really apprciate if solution is provided 🙂
Hi @awsiya
You can add a calculated column with the formula :
Hi @awsiya
Add index column via PQ
and modify the formula to :
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 56 | |
| 33 | |
| 33 | |
| 18 | |
| 16 |
| User | Count |
|---|---|
| 68 | |
| 67 | |
| 45 | |
| 30 | |
| 26 |