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 all,
I need a dynamic calculation, that based on filters and slicers always will group countries with less than 1% of revenue as "Other Countries". Otherwise the name of the country should be taken from the Country Name Column.
The Code below is able to find all countries with less than 1% and return that value or the string "Other Countries" depending on what I put into the code.
But I can not return the name of the country with the rest of the code and hope that you can help?
The error message I get, when I try to insert the country is
"A single value for Column "Country Name" in Table DimCountry can not be determined.
This can happen when a measure formula refers to a column that contains many values
without specifying an aggregation such as min max count or sum to get a single result.
Regards
Jørgen
Test Country =
VAR Revenuepct =
CALCULATE (
DIVIDE (
[Total Amount LCY],
[Total Net Sales LCY]
),
FILTER (
DimCountry,
DIVIDE (
[Total Amount LCY],
[Total Net Sales LCY]
) < 0.01
)
)
VAR HighRevenue =
CALCULATE (
DIVIDE (
[Total Amount LCY],
[Total Net Sales LCY]
),
FILTER (
DimCountry,
DIVIDE (
[Total Amount LCY],
[Total Net Sales LCY]
) > 0.01
)
)
RETURN
IF (
Revenuepct < 0,
HighRevenue,
Revenuepct
)
Solved! Go to Solution.
After one day of struggling, I found the code myself:
Hi @Zealand
Thanks for your sharing.
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
After one day of struggling, I found the code myself:
User | Count |
---|---|
86 | |
82 | |
68 | |
65 | |
55 |
User | Count |
---|---|
123 | |
100 | |
90 | |
83 | |
66 |