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 moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
Hi!
I am relatively new in using Power BI. In the current file I'm working on, I am facing some challenges.
Here are my sample tables (refer to first 2 screen shots)
Main Table - combined of monthly data
| Date | Client | Volume | KPI | Delivered from |
| 5-Dec | A | 50 | Pass | Location X |
| 18-Dec | B | 20 | Pass | Location Y |
| 23-Dec | A | 30 | Fail | Location X |
| 3-Feb | B | 10 | Fail | Location Z |
| 14-Feb | C | 20 | Pass | Location X |
| 27-Feb | C | 30 | Pass | Location Z |
| 8-Mar | A | 20 | Fail | Location Y |
| 19-Mar | B | 20 | Fail | Location Y |
| 26-Mar | C | 30 | Pass | Location Z |
Category Table - combined data based on quarterly survey results. However, it's not required for the client to answer the quarterly survey.
| Date | Client | Category |
| Mar 2019 | A | Promoter |
| Mar 2019 | B | Detractor |
| Dec 2018 | A | Detractor |
| Dec 2018 | C | Promoter |
| Sept 2018 | C | Promoter |
| Sept 2018 | B | Promoter |
I should have an output like below but illustrated in 3 different scenarios (depending on the month chosen by the reader).
Table to be reported
The category column should display the most recent category of the client, depending on the month chosen by the reader. Below illustrates on how the report should look like in connection with the tables.
I have 2 main challenges:
I hope you guys could help me out!
THank you
DK
Solved! Go to Solution.
Hi @newgirl
You may try below measure.Attached sample file for your reference.
Measure =
VAR recent_date =
CALCULATE (
MAX ( Category[MonthYear] ),
FILTER (
ALL ( Category ),
Category[Client] = MAX ( Main[Client] )
&& Category[MonthYear] <= MAX ( 'Date'[MonthYear] )
)
)
RETURN
CALCULATE (
MAX ( Category[Category] ),
FILTER (
Category,
Category[Client] = MAX ( Main[Client] )
&& Category[MonthYear] = recent_date
)
)
Regards,
Hi @newgirl
You may try below measure.Attached sample file for your reference.
Measure =
VAR recent_date =
CALCULATE (
MAX ( Category[MonthYear] ),
FILTER (
ALL ( Category ),
Category[Client] = MAX ( Main[Client] )
&& Category[MonthYear] <= MAX ( 'Date'[MonthYear] )
)
)
RETURN
CALCULATE (
MAX ( Category[Category] ),
FILTER (
Category,
Category[Client] = MAX ( Main[Client] )
&& Category[MonthYear] = recent_date
)
)
Regards,
Thank you so much @v-cherch-msft !!! This worked perfectly. You are heaven-sent!
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 |
|---|---|
| 35 | |
| 32 | |
| 27 | |
| 23 | |
| 16 |
| User | Count |
|---|---|
| 65 | |
| 50 | |
| 30 | |
| 25 | |
| 24 |