The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
I have spent the past two days breaking my head, reading through the articles with no solution. Turning to the community for help.
Scenario: I have two large tables - I am appending one with another. I'm using multiple date columns (ex: date1, date2, date3) to arrive at a single/final date column: Final_Date. # of units gets aggregated by Final_Date. I need to offer a "What-If" scenario to the user such that they are able to adjust the number of days to see the changes to the aggregated # of units. For instance, moving the slider between 5 and 90, will adjust the per-row Final_Date by the SELECTEDVALUE of the slider.
What I did:
What-If Table:
Main Table:
1. Final_Date = IF(YEAR(Date1)>2000,[Date1]+Measure_User Input,IF(YEAR(Date2)>2000,[Date2]+Measure_User Input,IF(YEAR(Date3)>2000,Date3+Measure_User Input,Date1+Measure_User Input))) - did not work
I have tried a couple more options which do not work either
I think the problem is that a measure can't be added to transform a column. But, I have tried to create a new column using the measure SELECTEDVALUE('What-If Table'[Column_User Input Series], 90) but this column does not register the "selection" at all.
If someone has encountered a similar scenario OR, could help with a hint/recommendation/solution, I'd greatly appreciate it.
thank you
Solved! Go to Solution.
Hi @mvcsarma ,
You want to generate a Final date column whose value is changed according to user's selection, right? However, it is not supported to change column values dynamically. As calculated column is static once it has been initilized.
Regards,
Yuliana Gu
Yuliana - thank you for your note.
I saw that this feature needs to be implemented to get my scenario to work.
Thanks again!
Hi @mvcsarma ,
You want to generate a Final date column whose value is changed according to user's selection, right? However, it is not supported to change column values dynamically. As calculated column is static once it has been initilized.
Regards,
Yuliana Gu
Yuliana - thank you for your note.
I saw that this feature needs to be implemented to get my scenario to work.
Thanks again!
Adding other options for Main Table (that I tried)
2. Final_Date = IF(YEAR(Date1)>2000,DATEADD([Date1],Measure_User Input,DAY),IF(YEAR(Date2)>2000,DATEADD([Date2],Measure_User Input,DAY),IF(YEAR(Date3)>2000,(Date3,Measure_User Input,DAY),DATEADD(Date1,Measure_User Input,DAY)))) - did not work 3. Final_Date = IF(YEAR(Date1)>2000,[Date1]+SELECTEDVALUE('What-If Table'[Column_User Input Series], 90),IF(YEAR(Date2)>2000,[Date2]+SELECTEDVALUE('What-If Table'[Column_User Input Series], 90),IF(YEAR(Date3)>2000,Date3+SELECTEDVALUE('What-If Table'[Column_User Input Series], 90),Date1+SELECTEDVALUE('What-If Table'[Column_User Input Series], 90)))) - did not work
User | Count |
---|---|
63 | |
56 | |
54 | |
51 | |
31 |
User | Count |
---|---|
180 | |
88 | |
70 | |
46 | |
43 |