Forum Discussion
Background Color in Matrix rows
- Anonymous1 year ago
Hi Prakash1050 ,
If you want to automatically determine if a month is legal, you can create two columns on the tableIsNotBlank = IF( 'Table 2'[Value] <> BLANK(), 1, 0 )IsTrue = CALCULATE( SUM('Table 2'[IsNotBlank]), ALLEXCEPT( 'Table 2', 'Table 2'[Month_Year] ) )Create a column on the calendar table
IsExist = VAR CurrentMonthYear = 'Calendar'[Calendar] VAR _isTrue = IF ( ISBLANK ( LOOKUPVALUE ( 'Table 2'[IsTrue], 'Table 2'[Month_Year], CurrentMonthYear ) ), 0, LOOKUPVALUE ( 'Table 2'[IsTrue], 'Table 2'[Month_Year], CurrentMonthYear ) ) RETURN IF( _isTrue > 0, 1, 0 )Putting isExist into the visualization filter
Set is 1 and final output
Best regards,
Albert HeIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Yes correct Anonymous ,
But, the data will be added regularly. So, i need check each time when the data will be added or not and I change the filter selection on each time.
Is any other way to achieve this logic?
Sorry for adding my doubts again and again.
Hi Prakash1050 ,
If you want to automatically determine if a month is legal, you can create two columns on the table
IsNotBlank =
IF(
'Table 2'[Value] <> BLANK(),
1,
0
)
IsTrue =
CALCULATE(
SUM('Table 2'[IsNotBlank]),
ALLEXCEPT(
'Table 2',
'Table 2'[Month_Year]
)
)
Create a column on the calendar table
IsExist =
VAR CurrentMonthYear = 'Calendar'[Calendar]
VAR _isTrue =
IF (
ISBLANK (
LOOKUPVALUE (
'Table 2'[IsTrue],
'Table 2'[Month_Year], CurrentMonthYear
)
),
0,
LOOKUPVALUE (
'Table 2'[IsTrue],
'Table 2'[Month_Year], CurrentMonthYear
)
)
RETURN
IF(
_isTrue > 0,
1,
0
)
Putting isExist into the visualization filter
Set is 1 and final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- Prakash10501 year agoHelper III
Hi Anonymous ,
Thank you for this much effort.
It fullfil my requirement.Sorry, for this much days delayed.
This is I need. Thank you once again.