Forum Discussion
comparative measure for calculated column
Good evening Teachers
where if the count of the model is for example equal to or less than 10 units then you put "others", if this condition is not fulfilled then it returns the model of the computer.
In Excel I found it easy to solve with the following syntax:
= IF (COUNT.IF ([Model]; [@ Model]) <= 10; "others"; [@ Model])
but in dax I have not got it
I appreciate any guidance you can give me
Hi,
Try this calculated column formula
=if(CALCULATE(COUNTROWS(Table1),FILTER(Table1,[Modelo]=EARLIER([Modelo])))<10,"Others",[Modelo])
Hope this helps.
9 Replies
- Ashish_MathurSuper User
Hi,
Show some data and the expected result.
- AnonymousNot applicable
HI Anonymous,
Please provide the sample data for further analysis.
BTW, you formula seems like to use count function and if statement to check the count of model column, right?
Regards,
Xiaoxin Sheng
- AnonymousNot applicable
Thank you very much for the answer so diligent, attached screenshots of how the information is, what I want is a column like "ModeloAgrupado", but in dax
- Ashish_MathurSuper User
Hi,
Why dont you share your file??? Anyways, try this calculated column formula
=IF(COUNTROW(FILTER(Data,Data[Modelo]=EARLIER(Data[Modelo])))<=10,"Otros",[Modelo])
Hope this helps.
- AnonymousNot applicable
Anonymous
Thank you very much for the response so agile, I really do not know how to attach the file by this very place, so attach the link to download the .xls file
Even I have not managed to apply dax correctly in this type of cases, so what I have to do is to lower in excel and do it in the classic way.
Any help is appreciated
** question: can be obtained with the use of variables "VAR"- Ashish_MathurSuper User
Hi,
There is no download option available there.
- AnonymousNot applicable
HI Anonymous,
You can upload to onedrive or google drive and share the link here.
Regards,
Xiaoxin Sheng
- AnonymousNot applicable
Anonymous
Thank you very much for your help teachers, again attach the link with edit permissions.
Any help will be appreciated.- Ashish_MathurSuper User
Hi,
Try this calculated column formula
=if(CALCULATE(COUNTROWS(Table1),FILTER(Table1,[Modelo]=EARLIER([Modelo])))<10,"Others",[Modelo])
Hope this helps.