Forum Discussion
Calculated Column to provide a minimum numerical value based on multiple criteria
- 3 years ago
Thank you very much, the dax for the column works in your PBIX, but when I try to employ what you wrote to my work pbix, the calculated column partially works. Confusing since I see that it works in what you provided.
I ended up using DAX like this below in my work pbix and I get the same result in your dax and works completely in my work pbix.
test_column = CALCULATE (MIN (Data[Location Number]),ALLEXCEPT (Data,Data[Category Number],Data[Country]))
Hi, I am not sure if I understood you question correctly, but please check the below picture and the attached pbix file.
Expected result CC =
CALCULATE (
MIN ( Data[Location Number] ),
INDEX (
1,
FILTER (
SUMMARIZE ( Data, Data[Category Number], Data[Country], Data[Location Number] ),
Data[Location Number] <> BLANK ()
),
ORDERBY ( Data[Location Number], ASC ),
DEFAULT,
PARTITIONBY ( Data[Category Number], Data[Country] )
)
)
- quintans13 years ago
Helper I
Thank you very much, the dax for the column works in your PBIX, but when I try to employ what you wrote to my work pbix, the calculated column partially works. Confusing since I see that it works in what you provided.
I ended up using DAX like this below in my work pbix and I get the same result in your dax and works completely in my work pbix.
test_column = CALCULATE (MIN (Data[Location Number]),ALLEXCEPT (Data,Data[Category Number],Data[Country]))