I have a list with brand_name, terminal_description, product, price and date, and i need to know the price difference between two dates. So, i want to add a new column between two dates, which will show the price difference between that 2 dates.Ā
Thank you !
—————————— Damini Gohil BI Developer ——————————
Vishesh Jain
Member
September 20, 2019 at 3:35 AM
Hi ,
You can filter the table using the MAX() function, which will give you the max date in the current filter context. Then you can filter the table again to find all the dates that are less than the max date and from the filtered table get the max date. For. e.g. Max date = 16th Then filter the date column with dates that are less than the 16th and find the max of that, which should be the 15th. Then using the LOOKUPVALUE() function you should be able to get the prices for both and then do the subtraction.
You will need to use variables as it will make it easier to get the necessary pieces.
Of course this is just a theory that could work. If you could upload your sample file, we can take a look at it.
Hope this helps.
Thank you,
—————————— Vishesh Jain Owner VR Construction —————————— ——————————————-
Damini Gohil
Member
October 3, 2019 at 1:04 AM
Thanks, but it does not work.
—————————— Damini Gohil BI Developer —————————— ——————————————-
Vishesh Jain
Member
October 3, 2019 at 3:49 AM
Hi ,
If possible please can you share a sample file with us.
Also, the dates in question here, of which you want to compare the prices, are these dates going to be consecutive or the could be any random 2 dates??
The DAX code will differ depending on how you plan to make the selection of dates.
Thank you,
—————————— Vishesh Jain Owner VR Construction —————————— ——————————————-
Damini Gohil
Member
October 4, 2019 at 2:35 AM
Hello ?,
I want a difference between two dates which i have marked in picture and particular one column(difference between two dates) should be added between two date columns.
Thank You,
—————————— Damini Gohil BI Developer —————————— ——————————————-
Mick Fitzpatrick
Member
October 4, 2019 at 8:06 AM
You need to setup a Dates dimension containing every date you’re likely to include, and create a relationship between this and your date_col.
Then the following should work: SUM(Query1[price])-CALCULATE(SUM(Query1[price]), PREVIOUSDAY(‘Date_Dim'[Date]))
Please note:
This action will also remove this member from your connections and send a report to the site admin.
Please allow a few minutes for this process to complete.
Report
You have already reported this .
Welcome to our new site!
Here you will find a wealth of information created for peopleĀ that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!