Forum Discussion
From PowerBi to PowerPivot
- 5 years ago
See the DAX documentation here - SELECTEDVALUE function - DAX | Microsoft Docs
Your 2nd parameter needs to be the field wrapped in VALUES()
Hi Pat,
these are the measures i use, the IfFiltered is looking at text, the other ones to numbers. Number 5 goes wrong.
Thank you in advance!
1. CheckHoofd?:=Max(Hoofd[Subtotal?])
2. IfFiltered:=ISFILTERED(Grootboek[Ertragslage])
3. Total IST a:=sum('Grootboek 2'[Bedrag in EV])
4. Total IST b:=if(COUNTROWS(Hoofd)=1;
CALCULATE([Total IST a];
all(Hoofd);
Hoofd[Hoofd ID]<=VALUES(Hoofd[Hoofd ID])
)
)
5. Total IST c:=if(AND([IfFiltered]=true();[CheckHoofd?]=1);
BLANK();
SWITCH(TRUE();
IF(HASONEVALUE(Hoofd[Subtotal?]);0;[Total IST a]);
IF(HASONEVALUE(Hoofd[Subtotal?]);1;[Total IST b])
))
See the DAX documentation here - SELECTEDVALUE function - DAX | Microsoft Docs
Your 2nd parameter needs to be the field wrapped in VALUES()