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.
Hi all,
I have a requirement where we need to have a table to show data difference between 2 dates (Snapshot Data)
We need to see the difference in $$ amount between 2 dates of date inserted (data for the captured date).
The user will have the ability to select 2 different dates from the snapshot tabe to see the differences.
Is there any way this can be achieved?
Thanks in Advance.
Hi @BItoken ,
I agree with what suggested by @amitchandak .You need 2 date tables as slicer.
Could you pls provide some sample data for test?
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Hey thank you both for the response.
This is what i am actually looking for int he screen shot below.
I have daily snapshot of data and i need to display so user can select date to see what changed between 2 dates
Hi @BItoken ,
Sorry,I misunderstood your requirement before.
Check my steps below:
First create a date table for users to select.
Then create a measure as below:
Measure =
var _maxdate=CALCULATE(MAX('date'[date]),ALLSELECTED('date'[date]))
var _mindate=CALCULATE(MIN('date'[date]),ALLSELECTED('date'[date]))
var _diff=CALCULATE(SUM('Table'[value]),FILTER('Table','Table'[date]=_mindate))-CALCULATE(SUM('Table'[value]),FILTER('Table','Table'[date]=_maxdate))
var _count=CALCULATE(DISTINCTCOUNT('date'[date]),ALLSELECTED('date'[date]))
Return
IF(ISINSCOPE('Table'[date]),CALCULATE(SUM('Table'[value]),FILTER('Table','Table'[date] in FILTERS('date'[date]))),
IF(_count<>2,BLANK(),
IF(_diff>0,_diff,"("&ABS(_diff)&")")))
And you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
@v-kelly-msft Thanks for the response. I tried your proposed solution but my table does not show any records when i add that measure
Can i send u the file im working on to ur inbox?
Hi @BItoken ,
Sorry for the late reply.
Yes,pls remove the confidential information and share us a public link to access it.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
@BItoken , Based on what I got.
You need to have 2 date tables one of them can be joined and one independent. If you need two slicer for same date
I explained here
Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI
In case you need one slicer for two different date columns, you need one date table and use userelationship
Hi @amitchandak, Thanks for the response. I looked at the video on the blog but i dont think it would serve my purpose or would it.
This is what i am actually looking for Check the screen shot below.
I have daily snapshot of data and i need to display so user can select date (may be 2 slicers) to see what changed between the 2 selected dates.
Hi @BItoken ,
Have you checked my last reply?Is your issue solved now?
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Hi @BItoken ,
Could you pls provide some sample data for test?Better with expected output.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
93 | |
77 | |
65 | |
53 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |