Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hello.
I would need your help please with a bit complex multiple if statement with multiple conditions where I struggle with some issues.
This is my dax:
Issues:
1. I want to assign specific rates in different and multiple buckets but the results are not the expected.
I start with the below for exmaple:
Solved! Go to Solution.
Hi, @vbis ;
The last DAX can be simplified to and could try it.
Rates =
IF (
( Clothes[Color] IN { "White", "Black" }&& [Units Sold] = "Low" )
|| Clothes[Color] = "Grey",
SWITCH ( [Size], "Small", "5", "Medium", "10", "Large", "15" ),
"null")
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @vbis ;
Perhaps you can reduce the performance of the data itself and optimize the performance. Or optimize the data itself in the power query for ETL data processing.
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello.
Apparently, I still struggle with this.
I reduced the volume of the data (total number of rows now 1,408,856) and I also tried to simplify a bit the formula and i still get invalid results.
So, my dax now is:
Hi, @vbis ;
The last DAX can be simplified to and could try it.
Rates =
IF (
( Clothes[Color] IN { "White", "Black" }&& [Units Sold] = "Low" )
|| Clothes[Color] = "Grey",
SWITCH ( [Size], "Small", "5", "Medium", "10", "Large", "15" ),
"null")
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello.
Thank you for your response.
I tried this dax and i got the message:
"Something went wrong. There's not enough memory to complete this operation. Please try again later when there may be more memory available."
@vbis , check the data in the Size column any white space or case(Upper/Lower) issue. Overall formula looks correct
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
86 | |
85 | |
84 | |
67 | |
49 |
User | Count |
---|---|
131 | |
110 | |
97 | |
71 | |
67 |