Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hello Community. I have a table like this
Need help with the DAX so I can make a new column with the difference between one day and the day before. WIth that column I could measure the growth. I don't have a separate Date table. The date showed there is part of the same table as the data.
Thanks in advance
Solved! Go to Solution.
Hi @Anonymous,
Based on my test, you can refer to below steps:
1.I have entered sample data in the below picture to test for your problem.
2.Create three calculated columns to calculate your previous day, the value of the previous day and the Variance.
Previous Date = [Data]-1
Lastdayvalue =
var previousdays = Sheet1[Previous Date]
var valueofpre = CALCULATE(SUM(Sheet1[Max of Total de Me gusta]),ALL(Sheet1),Sheet1[Data] = previousdays)
return
IF(ISBLANK(valueofpre),0,valueofpre)
Variance = [Max of Total de Me gusta]-[Lastdayvalue]
3.Create a Table visual and add the [Date], [Max of Total de Me gusta], [Previous Date], [Variance] and the [Lastdayvalue] fields. Now you can see the result.
You can also download the PBIX file to have a view.
Regards,
Daniel He
Hi @Anonymous,
Based on my test, you can refer to below steps:
1.I have entered sample data in the below picture to test for your problem.
2.Create three calculated columns to calculate your previous day, the value of the previous day and the Variance.
Previous Date = [Data]-1
Lastdayvalue =
var previousdays = Sheet1[Previous Date]
var valueofpre = CALCULATE(SUM(Sheet1[Max of Total de Me gusta]),ALL(Sheet1),Sheet1[Data] = previousdays)
return
IF(ISBLANK(valueofpre),0,valueofpre)
Variance = [Max of Total de Me gusta]-[Lastdayvalue]
3.Create a Table visual and add the [Date], [Max of Total de Me gusta], [Previous Date], [Variance] and the [Lastdayvalue] fields. Now you can see the result.
You can also download the PBIX file to have a view.
Regards,
Daniel He
User | Count |
---|---|
127 | |
72 | |
70 | |
58 | |
53 |
User | Count |
---|---|
192 | |
96 | |
67 | |
64 | |
54 |