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 dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Solved! Go to Solution.
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.
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.
User | Count |
---|---|
77 | |
75 | |
46 | |
31 | |
28 |
User | Count |
---|---|
99 | |
91 | |
51 | |
49 | |
46 |