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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
oren
Helper III
Helper III

comparing same data for 2 different dates

Hi

i have table with prices and dates and i want to compare 2 prices from 2 different dates,

ffor that i created another same table with same data

for each table i used a diffrent date filter.

now i wants to compare the 2 different prices in another table

for this i created a measure in one of the tables -

 

---------------

DiffCountryPrice =
VAR thisyear =
SUM ( 'Sales By Country'[SaleAvgPrice] )
VAR lastyear =

SUM ( 'Sales by country 2'[SaleAvgPrice] )
RETURN if(or(ISBLANK(thisyear ) ,ISBLANK(lastyear )),BLANK(),
thisyear/lastyear-1)
 
---------
and then i used it in a new matrix
 
for some reason , it's not working.
i know this could work because i did it in different place.
i think it might be related to the filter sets or maybe i need to change something else..
 
 

Capture111JPG.JPG

 

 

thank you!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User
5 REPLIES 5
amitchandak
Super User
Super User

thank you

i read your blog - it did helped me to find how to compare data for 2 diffrent dates which is what is need.

the problem is that i also need to see the actual data (see the 2 matrix in the picture i sent), and if i use your method , than i cannot use the dates filters to see the actual data since i need to remove the connection between the date tables and the main data table (as you said in your blog - "Please note that we have not performed any join here with the Sales table. All three tables are independent tables.")

again , the main issue is to see metrix data for each dates (2 dates) and next to it, the diffrences.

i hope i was clear enoght .

 

thank you again.

 

i also tried this solution :

123.JPG

 

but it didn't worked well (it is working only if i put the same dates, if not it five me te data of the first tabe)

456.JPG

 

in the red i put the "measuer 3" , did not working  😞

ok

so it looks like i fount what i need. i did used the solution above (just had a little problem with an extra table i was needed to deleat)

thank you very much

 

v-yingjl
Community Support
Community Support

Hi @oren ,

So has this issue been solved? If it has been solved, glad to hear that. You can accept the suitable reply as solution, that way, other community members could easily find the answer when they get same issues. 


Best Regards,
Community Support Team _ Yingjie Li


Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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