Forum Discussion
Create a quick calculation with a part fixed and another dependent on the filters (PowerBI - DAX)
- 5 years ago
Hi, Anonymous
According to your description, you can try this measure:
Affinity = var _sumofselected=SUMX(ALLSELECTED('Dati Popolazione ATTR'),[Population]) var _sumofall=SUMX(ALL('Dati Popolazione ATTR'),[Population]) var _divide1=DIVIDE(_sumofselected,_sumofall) var _divide2=DIVIDE(ABS(_sumofselected),60483973) return DIVIDE(_divide1,_divide2)Then you can create a card chart to place the measure and a Slicer to place the [Attribute], like this:
And you can get what you want.
You can download my test pbix file here
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, Anonymous
According to your description, you can try this measure:
Affinity =
var _sumofselected=SUMX(ALLSELECTED('Dati Popolazione ATTR'),[Population])
var _sumofall=SUMX(ALL('Dati Popolazione ATTR'),[Population])
var _divide1=DIVIDE(_sumofselected,_sumofall)
var _divide2=DIVIDE(ABS(_sumofselected),60483973)
return DIVIDE(_divide1,_divide2)
Then you can create a card chart to place the measure and a Slicer to place the [Attribute], like this:
And you can get what you want.
You can download my test pbix file here
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.