Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi
I have a dashboard with data in the following format:
There is a number of accounts in the same table and for each account there are multiple monthly rows of data. There is a column called PnL. I have created a measure that calculates the percent change between one month and the next for each account, let's call it PnL Monthly Change. I would like to create a measure that can look at PnL Monthly Change for each account, for the latest month only and give me only the MAX value from all of them. The idea is that if it reaches a certain threshold, an email notification is issued.
Now, I've struggled with this because I cannot treat the PnL measure as a column. I can't create a calculated column for PnL change because (I think) there are multiple accounts in the same table. Maybe I am thinking about this in a wrong way and there is a simpler solution.
In the end, I would like to create a measure that only looks at the latest month, at all accounts, calculates the Monthly PnL Change for each account and then shows me the MAX value. TIA.
Solved! Go to Solution.
Hi @davinci_cat ,
You can try this DAX:
Max PnL Monthly Change for Latest Month =
CALCULATE(
MAXX(
ALL('Accounts'), // Replace with your actual accounts table name
[PnL Monthly Change]
),
FILTER(
ALL('Date'),
'Date'[Date].[MonthNo] = = MONTH(TODAY() - DATEDIFF("2023-01-01","2023-02-02",DAY))
)
)
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @davinci_cat ,
You can try this DAX:
Max PnL Monthly Change for Latest Month =
CALCULATE(
MAXX(
ALL('Accounts'), // Replace with your actual accounts table name
[PnL Monthly Change]
),
FILTER(
ALL('Date'),
'Date'[Date].[MonthNo] = = MONTH(TODAY() - DATEDIFF("2023-01-01","2023-02-02",DAY))
)
)
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
please provide sample data with an example of your expected solution.
Proud to be a Super User!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
67 | |
65 | |
56 | |
39 | |
27 |
User | Count |
---|---|
85 | |
59 | |
45 | |
43 | |
38 |