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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
TanFouc87
Frequent Visitor

Use other columns for row of visual after filter by DATEADD Date columns in CALCULATE

Hi guys, I have 2 tables that are Date_ref 

TanFouc87_0-1698049312200.png

and a table about Sales, in which there are monthly sales value records (I have a column "Parse" which have a start date of each month/ year, I link Sales[Parse] and Date_ref[Date] for relationship between two tables. I would like to compare the Sale of current month and Sale of previous month. Therefore, I have use 2 measures:
CM = Calculate(Sum(Sale[Value]))
PM = Calculate(Sum(Sale[Value]), DATEADD(Date_ref[Date], -1, MONTH))

The output is ok when I set the row of visual is Date_ref[Date]

TanFouc87_1-1698049922836.png

However, I want to display just three first letters of month. Therefore I create a column in Date_ref which named MonthShort.

But when I use it for row of visual the output is not as expected.

TanFouc87_2-1698050084678.png

How to solve the problem? Thank you in advance!

1 ACCEPTED SOLUTION
AilleryO
Memorable Member
Memorable Member

Hi,

It seems you're working witha date table but diid you mark this table as a date table ?

(Right click on your date table and choose mark as date table).

To have a date table you can use you need 3 stemps :

1/ create the date table (you did it)

2/ Mark as a date table (i think you did not)

3/ create a relationship with fact table (you did it I think)

Let us kiow if it helps

View solution in original post

2 REPLIES 2
AilleryO
Memorable Member
Memorable Member

Hi,

It seems you're working witha date table but diid you mark this table as a date table ?

(Right click on your date table and choose mark as date table).

To have a date table you can use you need 3 stemps :

1/ create the date table (you did it)

2/ Mark as a date table (i think you did not)

3/ create a relationship with fact table (you did it I think)

Let us kiow if it helps

That's great, It's worked. Thanks a lot.

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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