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

Combo Chart - Line & Column to show This vs Last Week Sales (Mon to Sun)

Hi, I need some help in creating a combo chart to show Weekdays on X axis Mon to Sun (I already have Dim_Date) and This week Sales in column and last week sales in a Line chart.
For an example, for this week (column) should only show data till today (Wednesday) and line should show all the data from previous week starting from Mon to Sun.

mbagwan_0-1677061067194.png

 

 

1 ACCEPTED SOLUTION
barritown
Super User
Super User

Hi, 

 

I'd solve your problem with the help of these two measures:

 

ThisWeekValue = IF ( MAX ( DIM_DATE[Date] ) <= TODAY(), MAX ( [Sales] ), BLANK() )

 

PreviousWeekValue = CALCULATE ( MAX ( [Sales] ), FILTER ( ALL ( DIM_DATE ), DIM_DATE[Date] = MAX ( DIM_DATE[Date] ) - 7 ) )
 
You may want to check the PBIX file here - https://www.dropbox.com/s/6hhwa92xmlpqq49/pbi-combo-imp.pbix?dl=0

View solution in original post

1 REPLY 1
barritown
Super User
Super User

Hi, 

 

I'd solve your problem with the help of these two measures:

 

ThisWeekValue = IF ( MAX ( DIM_DATE[Date] ) <= TODAY(), MAX ( [Sales] ), BLANK() )

 

PreviousWeekValue = CALCULATE ( MAX ( [Sales] ), FILTER ( ALL ( DIM_DATE ), DIM_DATE[Date] = MAX ( DIM_DATE[Date] ) - 7 ) )
 
You may want to check the PBIX file here - https://www.dropbox.com/s/6hhwa92xmlpqq49/pbi-combo-imp.pbix?dl=0

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.