Forum Discussion

kpaul's avatar
kpaul
Regular Visitor
5 years ago
Solved

How to select X axis and group by column dynamically

Hi all,
I need help in below usecase.
I am building a report in Power BI (migrating analytical web application to Power BI).
- Data source is Snowflake and using direct query.

- Data table has 37 millions of records.
Usecase is-
- Show data table and charts with measures for different dimensions. Charts are like current balance vs date or loan amount vs date grouped by fico score, or some other measure vs product category grouped by lender.
Basically the requirement of the application would be-
- There are multiple slicers for selecting records. (which is easy to achieve)
- There is one slicer to select x axis ( This is tricky. I found some tutorials that suggest to use UNPIVOT, which does not work in my case. With direct query and given the huge number of records, DAX cannot returen the resultset).
- There is one slicer to select group by column. User can select one or multiple columns (This is also tricky. Though it can be achieved through creating multiple sumarized tables and UNION them together to make a result set, this allows user to select only single group by column at a time)
- User should have flexibility to select which measure (one or multiple) they want to select. (This is also somewhat achievable through SWITCH case)

 

Can anyone help me to achieve above mentioned functionality in Power BI?
Is it at all possible to dynamically select X axis (dimension) not using UNPIVOT (convert columns to rows)?

 

2 Replies