Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello people, I am new to the Bi and the community.
I have a question that I could not find the exact same in other posts. I want to compare from one data source different and same dates, for example I want to compare 2 retailers on the same dates, or one retailer in two periods of time. Any ideas?
Hi @gpapasara,
I have made test with creating two measures as your requirement.
Difference for the same retailer = IF ( ISFILTERED ( 'Table'[Retailer] ), CALCULATE ( SUM ( 'Table'[Sales] ), FILTER ( 'Table', 'Table'[Date] = MAX ( 'Table'[Date] ) ) ) - CALCULATE ( SUM ( 'Table'[Sales] ), DATEADD ( 'Table'[Date], -1, DAY ) ), BLANK () )
difference for the same date = IF ( ISFILTERED ( 'Table'[Date] ), CALCULATE ( SUM ( 'Table'[Sales] ), FILTER ( 'Table', 'Table'[Retailer] = "B" ) ) - CALCULATE ( SUM ( 'Table'[Sales] ), FILTER ( 'Table', 'Table'[Retailer] = "A" ) ), BLANK () )
Here is the output.
More details you could refer to the attachment.
If you need additional help, please share some data sample and your desired output.
Best Regards,
Cherry
Hi, thank you for replying,
Please find below a sample of my data:
What I would like to have at the end of this is something like that:
Thank you again for the help.
Hi @gpapasara,
You could have a reference of this similar thread which has been solved.
If you still need help, could you please share your data sample as table, because it will take a lot time to create a data sample like the image you uploaded
Best Regards,
Cherry
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |