Forum Discussion
Anonymous
3 years agoNot applicable
Filter table using measure in a multiDimension DirectQuery connection to SAP
Hi All, I have connected Power BI to SAPHana via direct query using Multidimension mode.(No calculated column, parameters allowed). only thing I can use right now is measure. I need to filter...
- 3 years ago
not sure about your setup.
if you can still create a measure and table visuals, try this:
SalesSum = VAR _table = ADDCOLUMNS( TableName, "Weekday", WEEKDAY(TableName[Date], 2) ) VAR _table2 = FILTER( _table, [Weekday]<>6 &&[Weekday]<>7 &&TableName[Profit] <>0 ) RETURN CALCULATE(SUM(TableName[Profit]), _table2)i tried and it worked like this:
FreemanZ
3 years agoSuper User
hi Anonymous
try to create a table with this:
Table =
VAR _table =
ADDCOLUMNS(
TableName,
"Weekday",
WEEKDAY(TableName[Date], 2)
)
VAR _table2 =
FILTER(
_table,
[Weekday]<>6
&&[Weekday]<>7
&&TableName[Profit] <>0
)
RETURN
SELECTCOLUMNS(
_table2,
"Date", [Date],
"Location", [Location],
"Country", [Country],
"Sales", [Sales],
"Profit", [Profit]
)
i tried and it worked like this:
Good luck.
- Anonymous3 years agoNot applicable
Thank you so much for providing the DAX. Unfortunately New table option is greyed out in direct query multidimension connection.
- FreemanZ3 years agoSuper User
What is your ultimate goal? If you could have such a table, what would you do next?
- Anonymous3 years agoNot applicable
My ultimate goal is to calculate the sales after filtering out both the conditions in live connection.
Since its is Live so I cannot create a table.