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.
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 @Anonymous,
Could you please mark the proper answers as solutions?
Best Regards,
Dale
Hi @Anonymous,
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
User | Count |
---|---|
80 | |
78 | |
37 | |
34 | |
31 |
User | Count |
---|---|
93 | |
81 | |
60 | |
49 | |
49 |