March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
How do I add a column in the query editor like I did in the "easy" add column using dax?
Data:
Ingevoerd op | Valutadatum | Maatgevende boekdatum | comment |
01-07-2019 | 01-01-2020 | 01-01-2020 | (maxdate) |
01-02-2020 | 01-01-2020 | 01-02-2020 | (maxdate) |
01-02-2020 | 01-01-2019 | 31-12-2019 | year(valutadatum) < year(ingevoerd op) |
This worked:
maatgevende boekdatum =
VAR date_1 = 'FM Budget'[Ingevoerd op]
VAR date_boeking = 'FM Budget'[Valutadatum]
VAR year_1 = YEAR(date_1)
VAR year_boeking = year(date_boeking)
VAR maxdatum = max(date_1;date_boeking)
return
IF (year_boeking<year_1;
DATE(year_boeking;12;31); // for anti-dated addings
DATE(year(maxdatum);month(maxdatum);day(maxdatum)))
In the query editor I have tried Add custom column using
if Date.Year([Valutadatum])<Date.Year([Ingevoerd op])
then #date(Date.Year([Ingevoerd op],31,12)
else List.Max([Ingevoerd op],[Valutadatum], type date)
but that gives an error "token comma expected"
Solved! Go to Solution.
It lacks final parentheses to close #date(
Also the List.Max needs a list as input. Please try this instead
else List.Max(-[Entered in],[Currency Date]))
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
It lacks final parentheses to close #date(
Also the List.Max needs a list as input. Please try this instead
else List.Max(-[Entered in],[Currency Date]))
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
YES thanks!
With a little shaving to #date this was the final one:
else List.Max({[Entered on],[Currency Date]})
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
125 | |
85 | |
69 | |
54 | |
45 |
User | Count |
---|---|
204 | |
106 | |
98 | |
65 | |
54 |