Forum Discussion
Analitika
Post Prodigy
4 years agoNull rate in Power BI
Hi, Getting issue. I wanted to count rate comparison this year last year in sales. But getting null values, no idea why it happens? mok_ly =
IF( HASONEVALUE('Date'[Metai]) ,CALCULATE ( [moketi...
- Anonymous4 years ago
HI Analitika,
Perhaps you can try to use the date function to manually define the filter range for calculation.
mok_ly = VAR currDate = MAX ( 'Date'[Date] ) RETURN CALCULATE ( [moketina_suma], FILTER ( ALLSELECTED ( 'Fact' ), 'Fact'[Date] = DATE ( YEAR ( currDate ) - 1, MONTH ( currDate ), DAY ( currDate ) ) ), VALUES ( 'Date'[Metai] ) )Notice: replace the 'fact' table with the table your 'moketina_suma' formula is calculated.
Regards,Xiaoxin Sheng
Anonymous
4 years agoNot applicable
HI Analitika,
Perhaps you can try to use the date function to manually define the filter range for calculation.
mok_ly =
VAR currDate =
MAX ( 'Date'[Date] )
RETURN
CALCULATE (
[moketina_suma],
FILTER (
ALLSELECTED ( 'Fact' ),
'Fact'[Date]
= DATE ( YEAR ( currDate ) - 1, MONTH ( currDate ), DAY ( currDate ) )
),
VALUES ( 'Date'[Metai] )
)
Notice: replace the 'fact' table with the table your 'moketina_suma' formula is calculated.
Regards,
Xiaoxin Sheng