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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
jeyare
Helper II
Helper II

Line chart - daily data (Y) and Months (X) only

I'm struggling with something I haven't needed yet.


I have one aggregate table. In the table, I have (among others) columns "date", "month", "2t", and "date_Range_1".

 

Def:

date = date format
month = string, abbreviated 3-character month name (JAN, FEB, ...)
2t= decimal format
date_Range_1 = decimal, format, these are values from "2t" in the defined range of dates (date), otherwise BLANK. Note: "date_Range_1" values are "Don't Summarize".
I have several such "date_Range_x" columns in the same table.

 

Method:
- axis X = date (date hierarchy by Month)
- axis Y = date_Range_1

 

A problem:
The line chart shows only the defined function for the given month (SUM, AVG, MAX, MIN,...)

What I want to achieve:
1) the line chart will display only the month names on the X-axis from the "month" column in the right order (JAN - DEC).
2) the Y-axis will show daily changes from "date_Range_1" and not their function (SUM, AVG, MAX, MIN,...) for the given month.

Consider that I will use several other "date_Range_x" columns for the same line chart.

Like this one:

jeyare_0-1714379710601.png

 

Thank you in advance.

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @jeyare ,

 

Not sure if I understood correctly what you need but believe that you need to create a calendar table and  a measure that gives you the difference between the month and the previous month should be something similar to:

 

Variation =
SUM(Table[Value]) - CALCULATE (SUM(Table[Value]), DATEADD(Calendar[Date], -1, Month))

 

This will allow you to return the value for the comparision.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

1 REPLY 1
MFelix
Super User
Super User

Hi @jeyare ,

 

Not sure if I understood correctly what you need but believe that you need to create a calendar table and  a measure that gives you the difference between the month and the previous month should be something similar to:

 

Variation =
SUM(Table[Value]) - CALCULATE (SUM(Table[Value]), DATEADD(Calendar[Date], -1, Month))

 

This will allow you to return the value for the comparision.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.