This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
My data looks like this..
| PRDT | REG | DAT1 | DAT2 | DAT3 | DAT4 | QTY |
| P1 | US | 8/9/2018 | 12/9/2017 | 1/12/2019 | 10/31/2017 | 100 |
| P2 | EU | 3/9/2018 | 8/29/2017 | 9/9/2018 | 4/8/2017 | 200 |
| P3 | US | 10/1/2018 | 3/7/2017 | 6/22/2018 | 3/17/2017 | 3400 |
| P4 | ME | 12/20/2018 | 9/5/2017 | 1/10/2018 | 11/14/2017 | 400 |
| P1 | EU | 6/19/2018 | 7/27/2017 | 1/23/2018 | 8/15/2018 | 500 |
I am looking for an output like this
| PRDT | REG | MAXDATE | QTY |
| P1 | US | 1/12/2019 | 100 |
| P2 | EU | 9/9/2018 | 200 |
| P3 | US | 10/1/2018 | 3400 |
| P4 | ME | 12/20/2018 | 400 |
| P1 | EU | 8/15/2018 | 500 |
in the powerquery to develop a powerBI dashboard.
My query looks like this [ including the 4 date fields in the ouput] . Tried couple of methods but none of them was successful.
select
MP."PRODT" "PRDT",
MP."AREA" "REG",
MP."EFFDT" "DAT1",
MP."APPDT" "DAT2",
MP."CONSDT" "DAT3",
MP."ENTDT" "DAT4",
(SELECT Max(v) FROM
VALUES ((MP."EFFDT"),( MP."APPDT"), (MP."CONSDT"),(MP."ENTDT")) Value(v)
)
"MaxDate",
MP."quan" "QTY"
from
"_SYS_BIC"."xxxxx" MP
where MP."AREA" IN ('xxx','yyy') and MP."quan" >0
@Anonymous
You can add a custom Column like
=List.Max({[DAT1],[DAT2],[DAT3],[DAT4]})
I tried the above option by adding a custom column, but it is not giving me the MAX Date on Each record.
Infact I was trying to avoid pulling in all these 4 date fields in the query output.
So if I am able to add the MAX Syntax in the power Query (SQL) itself it would be great.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 28 | |
| 23 | |
| 22 | |
| 16 | |
| 16 |
| User | Count |
|---|---|
| 60 | |
| 35 | |
| 28 | |
| 22 | |
| 21 |