Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I'm importing data from Tabuar OLAP using a DAX query. But I want to filter on a column from the central fact table which has numberic values - 1 and 0
Evaluate(
FILTER(ADDCOLUMNS(
SUMMARIZE(
'FactTable',
'FactTable'[Col1],
'DateDim'[Col2],
'FactTable'[Col3],
-----------
-----------
-----------
),--Summarize end
"MeasureName", CALCULATE(SUM ( 'FactTable'[Col4] ))
), --Add columns end
VALUE(''DateDim'[Col2])>=1/1/2017 &
('FactTable'[NumCol5])=0 -- It is this condition which is giving me error (A single value for column cannot be determined.) I tried using Max and Sum but the query isn't resulting any rows.
) -- filter end
) -- evaluate end
How do I filter on the column with numeric value from the fact table? I want to get only the rows with NumCol5 value as 0.
Hi @savvari,
Could you please mark the proper answers as solutions?
Best Regards,
Dale
Hi @savvari,
DAX in the tabular SSAS is still DAX. There are some errors in your DAX formula.
1. No [NumCol5] that can be filtered due to it doesn't exist in the first parameter of FILTER.
2. The & should be &&.
Please refer to the formula below to adjust yours.
Evaluate(filter( ADDCOLUMNS( SUMMARIZE( 'FactTable', 'FactTable'[Col1], 'FactTable'[Col2], 'FactTable'[Col3], 'FactTable'[col5] ), "MeasureName", CALCULATE(SUM ( 'FactTable'[Col4] )) ), [col2] >=date(2018, 1,1)&&[col5]=0));
Best Regards,
Dale
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
97 | |
80 | |
66 | |
62 |
User | Count |
---|---|
145 | |
113 | |
105 | |
85 | |
65 |