Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
Hi,
I have this visual as attached,that has lot of visual level filters applied.
it has a dax measure called data completeness as below:
Data Completeness =
var _total = COUNT('Calendar'[Date])*COUNT(Points[DBName-Point_Id])
var _result = [Count of Exisitng Days]/_total
return _result
It references a dax called Count of Exisitng Days as below:
Count of Exisitng Days = Var dates = SUMMARIZE(Data, Data[DBName-Point_Id], Data[Date])
Var Ext_dates = COUNTROWS(dates)
return Ext_dates
Now, the problem i have here is the performance of this visual is causing report to slow down. Please let me know how to optimize the dax and further steps to increase the performance
PFA file here PR-419 - Data Coverage - Copy.pbix
Thanks in advance!
@marcorusso @danextian @tharunkumarRTK @Ritaf1983
Solved! Go to Solution.
Hello @sivarajan21 ,
Thank you for reaching out to Microsoft Fabric Community Forum.
@danextian Thank you for your quick response.
Thanks for the update. You've already done a good job reducing the visual load to around 11K, but the DAX Studio trace still shows a higher cost. Here are a few suggestions to further improve performance:
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos |
Regards,
B Manikanteswara Reddy
I made one change to your measures and I can see some good improvement
Before change: 10.5 seconds
After the change: 6.5 seconds
Measures
MEASURE 'DAX'[Count of Exisitng Days] =
SUMX ( VALUES( Data[Date] ), CALCULATE(SUMX(VALUES(Data[DBName-Point_Id]),1) ) )
MEASURE 'DAX'[Count of Possible Days] = COUNTROWS ( Points ) * COUNTROWS ( 'Calendar' )
MEASURE 'DAX'[Data Completeness] = DIVIDE ( [Count of Exisitng Days], [Count of Possible Days] )
Please test the results and also the performance.
Also, I saw multiple bidirectional relationships in your model, please avoid them. Same is the case with calculated tables. Avoid them
Need a Power BI Consultation? Hire me on Upwork
Connect on LinkedIn
|
I made one change to your measures and I can see some good improvement
Before change: 10.5 seconds
After the change: 6.5 seconds
Measures
MEASURE 'DAX'[Count of Exisitng Days] =
SUMX ( VALUES( Data[Date] ), CALCULATE(SUMX(VALUES(Data[DBName-Point_Id]),1) ) )
MEASURE 'DAX'[Count of Possible Days] = COUNTROWS ( Points ) * COUNTROWS ( 'Calendar' )
MEASURE 'DAX'[Data Completeness] = DIVIDE ( [Count of Exisitng Days], [Count of Possible Days] )
Please test the results and also the performance.
Also, I saw multiple bidirectional relationships in your model, please avoid them. Same is the case with calculated tables. Avoid them
Need a Power BI Consultation? Hire me on Upwork
Connect on LinkedIn
|
Hi @sivarajan21
Instead of using SUMMARIZE, consider using GROUPBY. Additionally, if possible, create a unique key by combining Data[DBName-Point_Id] and Data[Date] at the source or within the query editor. This way, you can simply perform a DISTINCTCOUNT on the precomputed key rather than building the combinations at query time, which will significantly improve query execution speed. Note: this will create an extra physical column, increasing your model's footprint.
Hi @danextian ,
I tried my best to bring this matrix performance level to 11k as shown below:
Below is the dax studio performance analyser report which shows 20k again:
Is there any modeling changes that i can do reduce the time consumption and improve the performance further?
Please advise!
PFA file here PR-419 - Data Coverage - 02.pbix
Thanks in advance!
Hello @sivarajan21 ,
Thank you for reaching out to Microsoft Fabric Community Forum.
@danextian Thank you for your quick response.
Thanks for the update. You've already done a good job reducing the visual load to around 11K, but the DAX Studio trace still shows a higher cost. Here are a few suggestions to further improve performance:
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos |
Regards,
B Manikanteswara Reddy
Hi @sivarajan21 ,
We wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.
Please don't forget to give a "Kudos |
Regards,
B Manikanteswara Reddy
User | Count |
---|---|
84 | |
73 | |
73 | |
56 | |
51 |
User | Count |
---|---|
43 | |
41 | |
36 | |
34 | |
30 |