Forum Discussion
Supressing values from a table
- 4 years ago
Hi hilvie ,
Based on your description, I have created a simple sample like this:
Please try:
Diff = VAR _currentyear = YEAR ( TODAY () ) RETURN IF ( MAX ( 'Calendar'[Month] ) <= MONTH ( TODAY () ), SUMX ( FILTER ( 'Table', [Month] = MAX ( 'Calendar'[Month] ) && YEAR ( [Date] ) = _currentyear ), [Value] ) - SUMX ( FILTER ( 'Table', [Month] = MAX ( 'Calendar'[Month] ) && YEAR ( [Date] ) = _currentyear - 1 ), [Value] ) )Then select show items with no data:
Final Output:
If the result is not what you want, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.
Refer to:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi hilvie ,
Based on your description, I have created a simple sample like this:
Please try:
Diff =
VAR _currentyear =
YEAR ( TODAY () )
RETURN
IF (
MAX ( 'Calendar'[Month] ) <= MONTH ( TODAY () ),
SUMX (
FILTER (
'Table',
[Month] = MAX ( 'Calendar'[Month] )
&& YEAR ( [Date] ) = _currentyear
),
[Value]
)
- SUMX (
FILTER (
'Table',
[Month] = MAX ( 'Calendar'[Month] )
&& YEAR ( [Date] ) = _currentyear - 1
),
[Value]
)
)
Then select show items with no data:
Final Output:
If the result is not what you want, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.
Refer to:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- hilvie4 years agoFrequent Visitor
Thank you for this!!!!
I`ve added a YEAR column and the visual works: