Forum Discussion
Anonymous
6 years agoNot applicable
powerbi desktop
Anonymous
6 years agoNot applicable
This is the requirement
v-alq-msft
Community Support
6 years agoHi, Anonymous
Based on your requirement, I have modified the data as below. The pbix file is attached in the end.
Base Date(a calculated table):
Base Date = DISTINCT('Table'[Date])
Compare Date(a calculated table):
Compare Date = DISTINCT('Table'[Date])
You may modify the measure as below.
Actual varaince =
var _comparetab =
CALCULATETABLE(
DISTINCT('Table'[Dimension]),
FILTER(
ALL('Table'),
'Table'[Date]=SELECTEDVALUE('Compare Date'[Date])
)
)
var _basetab =
CALCULATETABLE(
DISTINCT('Table'[Dimension]),
FILTER(
ALL('Table'),
'Table'[Date]=SELECTEDVALUE('Base Date'[Date])
)
)
var _result =
COUNTROWS(
FILTER(
_basetab,
NOT([Dimension] in _comparetab)
)
)
return
IF(
HASONEVALUE('Base Date'[Date])&&HASONEVALUE('Compare Date'[Date]),
IF(
ISBLANK(_result),
0,
_result
)
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous6 years agoNot applicable
Hi, count is coming right but I need to variance per employee but data is poping for every employee .
- Anonymous6 years agoNot applicable
I have also replaced the country of A(india ) to A(USA) on 06/01/19
- Anonymous6 years agoNot applicable
Net variance is coming wrong by selecting groups in slicer