Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi,
I have a DAX question I am looking for some advice on -
I have a simple DAX measure for Total Sales - SUM(Sales[SalesAmount]), in a table with Products like below:
But what I am after is for when the measure returns a duplicate value, for all duplicated values to return BLANK, just wondering how I would need to tweak the measure to get this result. So the end result looks like below.
Any advice appreciated, thanks in advance.
Solved! Go to Solution.
Duplicate Measure =
VAR CurrentAmount = [Total Amount]
VAR CountOfCurrentAmount =
CALCULATE(
COUNTROWS('table (2)'),
FILTER(
ALL('table (2)'),
'table (2)'[Amount] = CurrentAmount
)
)
RETURN
IF(CountOfCurrentAmount > 1, BLANK(), [Total Amount])
if i helped you solve your question please leave a thumbs up and accept as solution
As in the above example Bannana, Orange and Lettuce all returned 30, so therefore as that value occurs more than once than they should be BLANK.
Duplicate Measure =
VAR CurrentAmount = [Total Amount]
VAR CountOfCurrentAmount =
CALCULATE(
COUNTROWS('table (2)'),
FILTER(
ALL('table (2)'),
'table (2)'[Amount] = CurrentAmount
)
)
RETURN
IF(CountOfCurrentAmount > 1, BLANK(), [Total Amount])
if i helped you solve your question please leave a thumbs up and accept as solution
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
90 | |
89 | |
79 | |
70 | |
69 |
User | Count |
---|---|
226 | |
129 | |
119 | |
84 | |
77 |