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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
hasaneyldrm
Frequent Visitor

how to use a compared time filter

I want to see my main values ​like turnover and sales with certain periods (custom) and visualize the difference between them.

 

I'm trying to use a compared time filter, but it resets directly when I change it slightly with values. I don't understand where I went wrong.


What i did:


1-) I created a new table


Previous Date = ALLNOBLANKROW ( 'salesorder'[createdon] )


2-) I created a relationship 

hasaneyldrm_0-1687324583377.png



hasaneyldrm_1-1687324595167.png

 


3-) then i sync my values with Dax

Previous SaleQuantity =
CALCULATE (
    [orderNumberMeasure],
    ALL ( 'salesorder'[createdon] ),
    USERELATIONSHIP ( 'salesorder'[createdon], 'Previous Date'[createdon] )
)

hasaneyldrm_2-1687324615595.png



I can clearly see that the report is working, but when I try to pull data at different times, the data is reset.

hasaneyldrm_3-1687324628943.png

 



1 REPLY 1
some_bih
Super User
Super User

Hi @hasaneyldrm to see any kind of previous values just use time intelligence functions in DAX, like MTD, YTD ...

some of examples on link . Hope this help

https://www.daxpatterns.com/standard-time-related-calculations/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors