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 need to have an if formula that returns me a value from one column (Weight in this case) based on the date ranges (start date and end date).
In the example above, on the right table you will see product1 has 3 rows. The weight differs based on the start and end date.
How can I get a dax metric that returns me correct weight for each day? In the left table you will see a bunch of 0.10, instead of this I would like to have the 0.07, 0 or 0.03
I attach the pbix
https://1drv.ms/u/s!ApgeWwGTKtFdhjRSVqf-G5rb4BdX?e=n7kuj4
Thanks all!
Solved! Go to Solution.
Hi,
You may download my PBI file from here.
Hope this helps.
Hi,
You may download my PBI file from here.
Hope this helps.
Hi,
You may download my PBI file from here.
Hope this helps.
You just did a
Hi,
I did not write that measure. It was already there in your file. I carried out transformation steps on the second table to create one row for each date.
Haha sorry, you are right.
Hmm, can it be done with a dax instead of power query?
Thanks Ashish!
Why would you need that. What is the problem with the solution i have shared with you?
No problem at all, I would just like to see how that's done with dax if possible.
Thanks @Ashish_Mathur !
You are welcome. if my reply helped, please mark it as Answer.
I tested the solution on the pbix but it's not working well, the thing is that I have more than one weight attribute.
The columns are ingredients from a bill of materials.
Maybe the power query is not the best option or i am doing it wrong
Let me send another pbix with more realistic data.
Thanks.
I attach my PBIx using (or trying to use) your steps. In the table dashboard, you will see It is repeating each of the days 3 times.
Also I noticed you removed the end and start date from the query, I need those dates to be visible in my dahsboard for people to see it.
Can you help me?
https://1drv.ms/u/s!ApgeWwGTKtFdhjb-8R5LAVb1Amnk
Thanks
I am confused over what you want. Share a simple dataset and show me the exact result you want. Please realise that it takes a lot of my time to answer your question so please respect my time and effort and state the question and expected result very clearly. Review your question time and again before posting - that is the very least i can expect of you.
Apologies for the confusion.
Here is the excel with the desired solution. You will see colors blue, green and yellow that distinguish the values based on the dates.
https://1drv.ms/x/s!ApgeWwGTKtFdhjcOMqI6H9v620Lg?e=sAOzy5
Please do not remove the original columns start and end date with Power Query,
Hope this clarifies.
Regards.
You have shared the expected result. Now share the original data also in an Excel file.
Here you go
https://1drv.ms/u/s!ApgeWwGTKtFdhjucn0A8Q0gRN9jv?e=mhuaxU
Appreciate your patience and help.
Hi,
You may download my PBI file from here.
Hope this helps.
Thank you very much @Ashish_Mathur
It worked very well.
Apologies once again for not being clear from the start.
Regards.
You are welcome. No problem.
Please refer to this blog how work with two date, if this can help
Appreciate your Kudos.
Hi @amitchandak
I see you use count x, but in my case is not a count of cases. Is pretty much return a value based on the date ranges.
Appreciate you help!
@o59393 , Use this file. It has allocation between dates. You just do a copy no allocation
Hi @amitchandak
So I should go from:
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 |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |