Forum Discussion
Anonymous
3 years agoNot applicable
Dax calculation
Hello guys I need these calculation to work for a card visual to display the value of sum auditfile CALCULATE(SUM('2 (Auditfile)'[saldo]), IF(VALUES('2 (Auditfile)'[fiscalYear])>2018,[fisc...
Anonymous
3 years agoNot applicable
Hi Anonymous ,
Here I suggest you to create an unrelated Fiscal Year Table for slicer and create a measure to achieve your goal.
My Sample:
Fiscal Year Table:
Fiscal Year = VALUES(Auditfile[fiscalYear])
Measure:
Measure =
VAR _SELECTYEAR = VALUES('Fiscal Year'[fiscalYear])
VAR _PREVIOUSYEAR = SUMMARIZE( ADDCOLUMNS(_SELECTYEAR,"PY",[fiscalYear] - 1),[PY])
RETURN
CALCULATE(SUM(Auditfile[saldo]),FILTER(Auditfile,Auditfile[fiscalYear] IN _PREVIOUSYEAR))
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
3 years agoNot applicable
i need something like this but this doesnt work:
if(selectedvalue(auditfile[fiscalyear])>=2019, selectvalue(auditfile[fiscalyear] -1),
calculate(sum(auditfile[saldo])
so if i select a year in a slicer i want the value of the previous year. the previous year functie does not work for me the way i have the data.