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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! 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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors