Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
JonCross
Frequent Visitor

visualisation help with shwoing only last 6 months columns

Hi all

 

Very new here so forgive me is this has been covered but I have been searching for the answer and now need someone with more experience than me to point me in the right direction.  Sample data in table below.  I am trying to create visual based on the last 6 months but also only showing 6 columns in chronological order.  For example I want to show the measure data for December 2019/January2020/February2020/March2020/April2020/May2020.  Screengrab below is sort of what I want but you can see the horizontal scroll bar and it starts with January and goes on for 12 months.  Hope I am making sense.

 

image.png

 

 

Created at date     Resolved at date    Update at date    
YearQuarterMonthDaynumberproblem_typeYearQuarterMonthDaystatusYearQuarterMonthDayuser_id
2020Qtr 2May512790Other2020Qtr 2May5Resolved2020Qtr 2May5 
2019Qtr 4October319979SaaS2019Qtr 4November4Resolved2019Qtr 4November482433
2019Qtr 4November410006Network/Firewall2019Qtr 4November4Resolved2019Qtr 4November4102878
2019Qtr 4November410010Workstation2019Qtr 4November4Resolved2019Qtr 4November4102878
2019Qtr 4November610042Workstation2019Qtr 4November6Resolved2019Qtr 4November682434
1 ACCEPTED SOLUTION
v-yingjl
Community Support
Community Support

Hi @JonCross ,

You can try this measure, put it into the table visual filter and set its value as 1

Month Control =
VAR _firstdate =
    CALCULATE ( MIN ( test[Date] ), ALLSELECTED ( test ) )
VAR _date =
    MAX ( 'test'[Date] )
VAR datediff =
    DATEDIFF ( _firstdate, _date, MONTH )
RETURN
    IF ( datediff < 6 && datediff >= 0, 1, 0 )

Control measure.png

 

Here is my sample file that hopes to help you, please check and try it: visual show last 6 months value.pbix 

 

Best Regards,
Yingjie Li

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

1 REPLY 1
v-yingjl
Community Support
Community Support

Hi @JonCross ,

You can try this measure, put it into the table visual filter and set its value as 1

Month Control =
VAR _firstdate =
    CALCULATE ( MIN ( test[Date] ), ALLSELECTED ( test ) )
VAR _date =
    MAX ( 'test'[Date] )
VAR datediff =
    DATEDIFF ( _firstdate, _date, MONTH )
RETURN
    IF ( datediff < 6 && datediff >= 0, 1, 0 )

Control measure.png

 

Here is my sample file that hopes to help you, please check and try it: visual show last 6 months value.pbix 

 

Best Regards,
Yingjie Li

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.