Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

TRICKY - Line and Bar Chart Plot

Hi Expert

 

I want to plot the following data on a line and clustered column chart. 

MonthPastTotal CurrentTotal PD %Year
Jan-2015.52176.328.1%2021
Feb-2020.73169.2710.9%2021
Mar-2018.15161.2910.1%2021
Apr-2019.36132.0912.8%2021
May-2013.61119.4310.2%2021
Jun-209.22138.326.3%2021
Jul-209.40155.085.7%2021
Aug-207.92163.854.6%2021
Sep-204.41177.862.4%2021
Oct-204.52191.062.3%2021
Nov-206.03191.403.1%2021
Dec-205.13174.542.9%2021
Jan-215.75173.333.2%2021
Feb-214.94175.922.7%2021
 BarBarLine 

 

The Issue is if the user select from the Month Filter Jan 20 i want to only Plot the Data upto Jan 21 (ignore feb 21) likewise if the user selects Feb 20 then plot upto Feb 21 and if we had data for Mar 21 then ignore.... When i get and include Mar 20 data the plot upto Mar 21....and so on...

  • 1. Instead of using Month Name like 'Jan 2020 ' or 'Feb 2020', you can use date eg. First day of the month. Instead of  Jan 2020 - 1 Jan 2020. Which gives you the possibility to use some time intelligence functions.
    2. Create a calculated table using the following formula
        Months = DISTINCT(Table[Month])
    3.  Use Slicer for the Month from this table and not from the Original table
    4.  In the original table create a measure called MonthFilter
    MonthFilter = 
    var selectedmonth = EDATE(DATEVALUE(SELECTEDVALUE(Months[Month])),12)
    RETURN
    IF(MAX(Table[Month]) <= selectedmonth,1,0)
    4. Create a line chart for your data 
    5. In Visual level filter, add MonthFilter and set as 1 

     

    Regards,

    Sayali

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

1 Reply

  • 1. Instead of using Month Name like 'Jan 2020 ' or 'Feb 2020', you can use date eg. First day of the month. Instead of  Jan 2020 - 1 Jan 2020. Which gives you the possibility to use some time intelligence functions.
    2. Create a calculated table using the following formula
        Months = DISTINCT(Table[Month])
    3.  Use Slicer for the Month from this table and not from the Original table
    4.  In the original table create a measure called MonthFilter
    MonthFilter = 
    var selectedmonth = EDATE(DATEVALUE(SELECTEDVALUE(Months[Month])),12)
    RETURN
    IF(MAX(Table[Month]) <= selectedmonth,1,0)
    4. Create a line chart for your data 
    5. In Visual level filter, add MonthFilter and set as 1 

     

    Regards,

    Sayali

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