Forum Discussion
Need help to create filtered measures when I cannot access data source/query editor
- Anonymous6 years ago
Hi Anonymous,
I think you need to ask for some dummy data from the DBA.(you can ask him to copy some of records with the similar data structures) It is really hard to coding formula without any same data and data structures.
First, you can create a query parameter with the source data from the product column ('add as new query' feature). Then you can add a filter on the product column with the query parameters. ('suggest value' setting to 'query' and potin to the 'product list' that created in above steps as the source)
After these steps, you can edit parameters on the data view side(pick a product from the product list) to dynamic change the filter results based on product parameters.
Deep Dive into Query Parameters and Power BI Templates
Finally, you can change the 'source' step on the 'query edit' side to use query parameters parameterized the connector string with a connector to point the real data source.
If you only want to have a measure that calculates with slicer selections, you can try to use measure with calculating and allselected functions to get the filer effect from the slicer.
Measure = CALCULATE ( 'Expression', ALLSELECTED ( 'RawTable' ), VALUES ( 'Selector'[Columns] ) )Managing “all” functions in DAX: ALL, ALLSELECTED, ALLNOBLANKROW, ALLEXCEPT
DAX – The Many Faces of VALUES()
Regards,
Xiaoxin Sheng
Hi Anonymous,
I think you need to ask for some dummy data from the DBA.(you can ask him to copy some of records with the similar data structures) It is really hard to coding formula without any same data and data structures.
First, you can create a query parameter with the source data from the product column ('add as new query' feature). Then you can add a filter on the product column with the query parameters. ('suggest value' setting to 'query' and potin to the 'product list' that created in above steps as the source)
After these steps, you can edit parameters on the data view side(pick a product from the product list) to dynamic change the filter results based on product parameters.
Deep Dive into Query Parameters and Power BI Templates
Finally, you can change the 'source' step on the 'query edit' side to use query parameters parameterized the connector string with a connector to point the real data source.
If you only want to have a measure that calculates with slicer selections, you can try to use measure with calculating and allselected functions to get the filer effect from the slicer.
Measure =
CALCULATE (
'Expression',
ALLSELECTED ( 'RawTable' ),
VALUES ( 'Selector'[Columns] )
)
Managing “all” functions in DAX: ALL, ALLSELECTED, ALLNOBLANKROW, ALLEXCEPT
DAX – The Many Faces of VALUES()
Regards,
Xiaoxin Sheng