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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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