Forum Discussion
How to Hide Last 4 Quarters data in X axis Dynamically
- Anonymous6 years ago
HI rajendraongole1 ,
You can try to use the following measure to check current category and return tag, then you can use it on the line chart visual level filter to only display 'Y' tag records:
Measure = VAR _last = MAXX ( ALLSELECTED ( Test[YearQuarter] ), [YearQuarter] ) VAR _curr = LEFT ( MAX ( Test[YearQuarter] ), 4 ) & RIGHT ( MAX ( Test[YearQuarter] ), 1 ) VAR prev = LEFT ( _last, 4 ) - 1 & RIGHT ( _last, 1 ) RETURN IF ( _curr < prev, "Y", "N" )Regards,
Xiaoxin Sheng
Hi Anonymous Xiaoxin Sheng,
| YearQuarter | Value |
| 2015-1 | 3384 |
| 2015-2 | 3334 |
| 2015-3 | 2000 |
| 2015-4 | 3218 |
| 2016-1 | 3392 |
| 2016-2 | 4327 |
| 2016-3 | 4141 |
| 2016-4 | 2611 |
| 2017-1 | 2530 |
| 2017-2 | 6835 |
| 2017-3 | 5888 |
| 2017-4 | 2351 |
| 2018-1 | 3567 |
| 2018-2 | 4499 |
| 2018-3 | 3742 |
| 2018-4 | 2253 |
| 2019-1 | 1232 |
| 2019-2 | 8654 |
| 2019-3 | 3455 |
| 2019-4 | 2233 |
Thanks for the reply, I have shared the attached Excel. with current Output & Expecting output.
I have data available for last year Quarter data, but i ha ve to hide last complete year data and have to show upto before completed Quarter information. once this current Quarter next month data comes then only i have show 2019-Q1 .
I hope this information is helpful to understand.
Thanks
Expected:
Next Quarter i.e., 2020-01 comes then only i have to report 2019-1 Quarter data (values should reflect automatically).
Thank you.
HI rajendraongole1 ,
You can try to use the following measure to check current category and return tag, then you can use it on the line chart visual level filter to only display 'Y' tag records:
Measure =
VAR _last =
MAXX ( ALLSELECTED ( Test[YearQuarter] ), [YearQuarter] )
VAR _curr =
LEFT ( MAX ( Test[YearQuarter] ), 4 ) & RIGHT ( MAX ( Test[YearQuarter] ), 1 )
VAR prev =
LEFT ( _last, 4 ) - 1
& RIGHT ( _last, 1 )
RETURN
IF ( _curr < prev, "Y", "N" )
Regards,
Xiaoxin Sheng
- rajendraongole16 years ago
Super User
@ Team- Thank you for time and support