Forum Discussion

lotus22's avatar
lotus22
Helper III
4 years ago
Solved

Remove Duplicate Weeks from Bar Axis

I have duplicate Week 13 on the axix because there are two dates in the field. I am using formula to get week number from the date. I get daily data for current week (13) and weekly data for previous weeks.

 

How can I show only latest data for Week 13...currently it is showing for date 3/20, and 3/21?

 

 

  • Hi, lotus22 

    What is your raw data like? What bar visual are you using?

    You can consider creating an identity column and apply it to visual filter pane to filter data.
    Caculated column:

    flag =
    VAR r1 =
        CALCULATE ( MAX ( 'Table'[Date] ), ALLEXCEPT ( 'Table', 'Table'[WK Ending] ) )
    RETURN
        IF ( 'Table'[Date] = r1, 1, 0 )
    

     

    Best Regards,
    Community Support Team _ Eason

     

2 Replies

  • lotus22 , need to check this, But seem like this because of sort column. Sort column has two values for week 13. Check that

     

    If this does not help
    Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

  • v-easonf-msft's avatar
    v-easonf-msft
    Community Support

    Hi, lotus22 

    What is your raw data like? What bar visual are you using?

    You can consider creating an identity column and apply it to visual filter pane to filter data.
    Caculated column:

    flag =
    VAR r1 =
        CALCULATE ( MAX ( 'Table'[Date] ), ALLEXCEPT ( 'Table', 'Table'[WK Ending] ) )
    RETURN
        IF ( 'Table'[Date] = r1, 1, 0 )
    

     

    Best Regards,
    Community Support Team _ Eason