Forum Discussion
Filter values x-axis dynamically
- 8 years ago
Anonymous
I Answer in PM. The answer to avoid this is:
Cost MoM% = IF(MAX('Table1'[Date_new])<>BLANK(); IF( ISFILTERED('Table1'[Date_new]); ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column."); VAR __PREV_MONTH = CALCULATE( SUM('Table1'[Cost]); DATEADD('Table1'[Date_new].[Date]; -1; MONTH) ) RETURN DIVIDE(SUM('Table1'[Cost]) - __PREV_MONTH; __PREV_MONTH) ))
- Anonymous8 years agoNot applicable
Still says ; is invalid to me. What's the difference of using a ' ; ' and a ' , ' ?
Can you also explain what does adding IF(HASONEVALUE()) does to the formula?
Thanks so much! : )
- Vvelarde8 years agoCommunity Champion
Anonymous
The ; and , is just regional settings.
If you Formula works with , all should be with ,
HASONEVALUE evaluate in your scenario if you had a date in that context. In April you don't have dates so the result is blank and don't show in the visual.
Regards
- Anonymous8 years agoNot applicable
Okay, I understand that part now. Thanks Victor! But the thing is the month on month change quick measure always gives the final row (the -100%). What should I do so that the last row will not end up showing in my chart? (Thanks for answering my endless questions :) )