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
sunielsamal
Frequent Visitor

show data till selected month in a line chart

Hi All,

 

I have one requirement to Display month wise comparision data for 2 years in a line chart. The challange here is  If I select only june Month then the Data should display for till June Month instead of only June Month.  Similarly If I am selecting any month then the Data should display till that month. I have a Date hirarchy calender and a Fact table. both the table has relations.

 

Many Thanks in Advance

Sunil

3 REPLIES 3
sunielsamal
Frequent Visitor

Hi Kim,

 

Thank you Very Much for your Quick solution.  I saw the Logic. It working really fine as per the requirement. But The challange here is I have a Single Date Slicer which is in Hirarchial format. Like Year then Quarter, Month.

 

Can we achieve the same with the single slicer? Because I have already written Many Dax Queries based upon that slicer. Again changing the fieldname will require lot of changes

PC2790
Community Champion
Community Champion

Hey @sunielsamal ,

 

If you have the Date Table and relationship is there with other tables, you can use a relative date slicer. 

This will give the end user the flexibility to filter the data as per their convenience.

PC2790_1-1652766372957.png

PC2790_2-1652766404424.png

 

 

PC2790_0-1652766335785.png

I hope this solves your purpose

Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.

I tried to create a sample pbix file like the below.

I suggest having a disconnected slicer table for the purpose of creating a slicer like below. And try to create a measure like below.

 

Untitled.png

 

Quantity total measure: =
CALCULATE (
    SUM ( Data[Quantity] ),
    'Calendar'[Month] <= MAX ( 'Slicer Table'[Month] )
)

  

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


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.