The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hello,
I'm witnessing a performance issue for a quite simple measure used in a big table.
If I use this measure, the result is instant
Hi @WSeirafi With "if" statements, you need to go through each item one by one. When you have a huge table , using "if" statements can be slow. It’s like checking each item individually. The default query timeout is 225 seconds. Please check its performance. Try with switch function, because it faster than "if".
I answered below, unluckily it was not effective
@WSeirafi ISBLANK is notorious for bad performance. Try this:
Measure =
IF (
SELECTEDVALUE ( Table[Column] ) = BLANK(),
1,
0
)
or
Measure =
IF (
SELECTEDVALUE ( Table[Column] ) <> BLANK(),
0,
1
)
or
Measure =
SWITCH( SELECTEDVALUE ( Table[Column] ),
BLANK(), 1,
0
)
I tried with both suggestions you gave
@WSeirafi It's hard to say with the information provided. Would need additional context of the problem you are actually trying to solve. Is this something that could be done using the Filter pane?
Hello,
I ended up merging all my data into one big table for this purpose, but my issue now is that when I use a Switch / if measure in my table, the slicer do not have any effect on it.
I guess it's the fact that the IF measure returns a value for every rown but how can I prevent this from happening ?
Thanks for your help
Might be a solution
User | Count |
---|---|
68 | |
63 | |
59 | |
54 | |
28 |
User | Count |
---|---|
183 | |
80 | |
62 | |
46 | |
38 |