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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
chlimaye
Regular Visitor

Currenmonth and Previous Month values along with comments

Hi ,

 

I have created one table which Market, Brand, Sub-Month , Volume , Curre- PreviousMonth Diff, Comments.

 

In data model i am havign two table one is DVMI and other DVMIBC with comments.

Two table has relatioship with composite key Market-Brand-SubMonth.

 

From DVMIBC we are fetchimg comments and rest of the fields i am getting fro DVMI table.

 

I am showing current month and previous month volume with the help of master calander for submonth.

We have comments for Some Market-brand-submonth.

 

For example,

Canada-ABC-202410 has comments in DVMIBC table and i am showing the comments filed in table and it got split up as we are showing previous month volumes along with curenmonth volume in same row with dax for previous month.

CALCULATE([Volume],
DATEADD(submissionDate[Date],-1,MONTH))
 
The requirement is we want data in same row with out any split. 
 without previousmonth volumes data is on same with comment for the sep month.
chlimaye_0-1737057564631.png

when we add previous month vs currenmont diff we get below output 

chlimaye_2-1737057789182.png

 


here current month is sep and as per calculations previous is Aug but comment we have it for Sep month only.

 

how we get data in one row in this case.

4 REPLIES 4
Anonymous
Not applicable

Hi @chlimaye ,

 

I suggest you to create a dimdate table with continuous date and then use datetime intelligence function: 

PREVIOUSMONTH().
submissionDate = ADDCOLUMNS(CALENDAR(DATE(2024,1,01),DATE(2024,12,31)),"Sub Month",FORMAT([Date],"YYYY-MM"),"YearMonth",YEAR([Date])*100 + MONTH([Date]))

Relationship:

vrzhoumsft_0-1737101403006.png

Measures:

M_Volume = CALCULATE(SUM('Table'[Volume]))
Previous Volume = CALCULATE([M_Volume],PREVIOUSMONTH(submissionDate[Date]))
Curre- PreviousMonth Diff = [M_Volume] - [Previous Volume]

 Result is as below.

vrzhoumsft_1-1737101453613.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

got same result.

chlimaye_0-1737116407971.png

 

Anonymous
Not applicable

Hi @chlimaye ,

 

Please make sure there is continuous date in your dimdate table or datetime intelligence function will not work.

I think your issue is based on your data model. You can download my attatchment file before and compare mine with yours.

If this still couldn't help you solve your issue. Please share a sample file with us and show us a screenshot with the result you want. This will make it easier to find the solution.

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

it giving me same output.

chlimaye_0-1737116268516.png

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.