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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
subho220
Helper I
Helper I

Time Difference sales data

Hello Everyone,

 

I am trying to create a report with the sample data attached. Below is the Layout of the report which i want -

subho220_0-1648567448653.png

So, I have all the data available as Columns. I just can't figure out how can I put the data in this format.

Also, When I am trying to calculate the Previous Month/year/quarter values sometimes the calculated measures are not showing anything.

Steps I followed -

1- Created a Dim_Date table with continuous date from 2000-01-01 to 2099-12-31.

2- Created  measures for Previous month/year/quarter -> 

QQC Prev Month = CALCULATE(SUM('ICS_[Warehouse_Balance_Final]'[QuantityinQualityControl]),PREVIOUSMONTH(Dim_date[Date].[Date])).
 
Can anyone help me in solving this issue ?
 
Thanks in advance
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@subho220 , Do not use .Date. Mark Date table as date table 

QQC Prev Month = CALCULATE(SUM('ICS_[Warehouse_Balance_Final]'[QuantityinQualityControl]),PREVIOUSMONTH(Dim_date[Date]))

 

or

 

QQC Prev Month = CALCULATE(SUM('ICS_[Warehouse_Balance_Final]'[QuantityinQualityControl]),datesmtd(dateadd(Dim_date[Date],-1,month) ))

 

 

Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs

Calculation Groups- Measure Slicer, Measure Header Grouping, Measure to dimension conversion. Complex Table display : https://youtu.be/qMNv67P8Go0

 

Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5b...
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@subho220 , Do not use .Date. Mark Date table as date table 

QQC Prev Month = CALCULATE(SUM('ICS_[Warehouse_Balance_Final]'[QuantityinQualityControl]),PREVIOUSMONTH(Dim_date[Date]))

 

or

 

QQC Prev Month = CALCULATE(SUM('ICS_[Warehouse_Balance_Final]'[QuantityinQualityControl]),datesmtd(dateadd(Dim_date[Date],-1,month) ))

 

 

Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs

Calculation Groups- Measure Slicer, Measure Header Grouping, Measure to dimension conversion. Complex Table display : https://youtu.be/qMNv67P8Go0

 

Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5b...
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

thanks @amitchandak  for your quick resolution. appreciate it 🙂

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.