Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi Community,
I am facing some issues with the performance of the DAX code and it seems like I have found a bottleneck for it.
Just for a background, in my reports, I show values for companies and for benchmarks. The benchmark logic is quite complex and has to compute more data than simply selected companies, that is why the default state of a report is only selected companies so that it will open up fast and then the user can select a benchmark additionally.
All companies have positive number IDs and all benchmarks have negative number IDs. That's how we distinguish then.
So, I have an IF function inside my DAX like this:
IF(ID>0, [simple logic for comapines], [complex logic for benchmarks]).
The formula itself works perfectly fine, however, even when we only looking at the selected companies the time for compution is still the same as it would've been for benchmarks. When I remove the else statement the loading time is less than 5 seconds, but when I add it back, even though the condition ID>0 is true and else statement should not be evalueated the loading time grows to 10-15 seconds.
I have read it moght be because the eager evaluatio taking place, so we need to somehow trigger the strict evaluation so that only the first part of DAX is evaluated, but I could not fine a way to do it.
I would appreaciate any ideas regardinf this.
@Anonymous , if this is column, then not having else means some rows will not be evaluated hence less time.
If this is measure try like
calculate([Simple logic], filter(Table, Table[ID] >0) ) + calculate([Complex logic], filter(Table, Table[ID] <0) )
if the result is text use & in place of +
thanks a lot for the idea, however, I have already tried this and it did not improve the performance 😞
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 9 | |
| 8 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 23 | |
| 14 | |
| 10 | |
| 6 | |
| 5 |