Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
Traffic SOB = if(countrows(values(dim_country[planning market]))>1, BLANK(), DIVIDE([Traffic], CALCULATE([Traffic],ALL('dim_dm-channels'))))
Hi, I found this formula in a report I got to maintain;
The formula aims to calculate the share of traffic of different marketing channels.
The logic behind the second element of the if statement, DIVIDE function, is clear but I am guessing what the original report owner (I cannot reach out to him) wanted to achive with the first condition -> countrows(values(dim_country[planning market]))>1, BLANK()
Any idea about how to interpret it? Thanks
Solved! Go to Solution.
That is checking that there is no more than 1 value in the current filter context for the planning market, either because no filter has been applied to the column or if e.g. it is the total or subtotal row of a table or matrix.
That is checking that there is no more than 1 value in the current filter context for the planning market, either because no filter has been applied to the column or if e.g. it is the total or subtotal row of a table or matrix.
Thanks for your answer. So that means it can be equivalent to a COUNTDISTINCT?
Yes, as long as CALCULATE is used to force context transition.
Check out the November 2023 Power BI update to learn about new features.