The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi All,
I am trying to create a conditional category based on below calculated column and measue:
Any clue what should be I doing differently.
Thanks
Solved! Go to Solution.
Hi @simmi21
I guess it may be caused by the inconsistency of the levels of your two association tables. I currently have no way to completely restore your table’Orders’ and table’Master’. I just made a simple association, and there is no problem after the data test .
table’Master’
table’Orders’
Relationships between three tables
The final result
I have attached my pbix file, you can refer to it .
Best Regards
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @simmi21
I guess it may be caused by the inconsistency of the levels of your two association tables. I currently have no way to completely restore your table’Orders’ and table’Master’. I just made a simple association, and there is no problem after the data test .
table’Master’
table’Orders’
Relationships between three tables
The final result
I have attached my pbix file, you can refer to it .
Best Regards
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @simmi21
I restored the scene according to your formula ,except that I don't understand Calculated Column S/M , the rest of the formula runs normally .
You created a calculated column S/M ,but I didn’t see the column used in other formula , So are you sure that your error is due to the following formula ?
My sample :
And the measure and column I created
Measure : Acc-class = SWITCH(true(), AVERAGE('fc'[test]) >= .70 , "high", AVERAGE('fc'[test])>=.20, "medium", AVERAGE('fc'[test]) < .20, "low")
Column : test = IFERROR(Max(0, 1-(DIVIDE('fc'[ABS_DEV],'fc'[Order]))),0)
COLUMN proposal sm = if(([Acc-class] = "high" || 'fc'[ABC Class] = "C"),"S", "M")
The effect is as shown :
Best Regards
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Ailsa,
You are right, what I meant was ABC class column not S/M.
Let me share more details:
I have 3 table FC, Order, Master
FC is linked to Order table at Material & Month level.
FC is linked to Master at Material level.
Here are the additional columns and measures created in FC table:
Calculated Column
Now I am trying to create additional column proposal sm using a conditional logic based on Acc class and Abc Class and this is resulting in memory error.
= if(([Acc-class] = "high" || 'fc'[ABC Class] = "C"),"S", "M")
I am not sure, if it is too many calculated column at the back of this formula which is resullting in this issue(somethis which Power Bi doesn't allow), or simply I need to reduce the size of my data somehow.
Hi,
If you can describe your question, share some data and show the expected result, an alternative solution may be found out. As suggested by @CNENFRNL, what you are trying to accomlish is not possible.
You can reference calculated column in a measure but not the other way around, ie there's no way for measures to take effect in calculated columns.
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |