Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Meera556
Helper I
Helper I

Need help in getting window max of a table

I have a line chart in tableau that need to be recreated in power bi.The line chart uses window_max(count of errors/total(count of errors)) as a calculated field. I'm new to power bi and I need this to be created in it.Can anyone please help how to create DAX for this.

It also contains another calculated field which contains {EXCLUDE [time_stamp] : [count of errors]}.How can we use this LOD in creating a line chart in Power BI.

Thank you

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Meera556 ,

In Power BI, to achieve a similar calculation to window_max(count of errors/total(count of errors)), you would typically use a combination of DAX functions to calculate the percentage of errors and then find the maximum of these percentages across your dataset. However, Power BI calculates aggregations differently, and you might not need a direct translation of window_max. Instead, you can calculate the total count of errors, the count of errors per category (or another dimension you're analyzing), and then use a measure to find the maximum percentage.

 

First, ensure you have a measure for Count of Errors. If not, create one:

Count of Errors = COUNT(YourTable[ErrorColumn])

Then, create a measure for the total count of errors:

Total Count of Errors = CALCULATE([Count of Errors], ALL(YourTable))

Next, calculate the percentage of errors:

Percentage of Errors = DIVIDE([Count of Errors], [Total Count of Errors])

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Meera556 ,

In Power BI, to achieve a similar calculation to window_max(count of errors/total(count of errors)), you would typically use a combination of DAX functions to calculate the percentage of errors and then find the maximum of these percentages across your dataset. However, Power BI calculates aggregations differently, and you might not need a direct translation of window_max. Instead, you can calculate the total count of errors, the count of errors per category (or another dimension you're analyzing), and then use a measure to find the maximum percentage.

 

First, ensure you have a measure for Count of Errors. If not, create one:

Count of Errors = COUNT(YourTable[ErrorColumn])

Then, create a measure for the total count of errors:

Total Count of Errors = CALCULATE([Count of Errors], ALL(YourTable))

Next, calculate the percentage of errors:

Percentage of Errors = DIVIDE([Count of Errors], [Total Count of Errors])

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.