The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all -
Looking to see if it is at all possible to perform a "Dynamic" Group By Aggregation AFTER filtering the data based on criteria set by the user from PowerBI.
Essentially :
I understand this would increase the computing strain on PowerBI so was thinking there might be an option to "compute" after selecting filters.
I can understand how to make a Measure to check if the filter affects a row (TRUE / FALSE), but that doesn't change the fact that I need the group by / aggregate to work after the filter is applied.
This is a bit of a long shot - I have a feeling there's not an option for this. I have been using more coded options to pull this aggregate data from a database, however, I can't do that based on user input from the dashboard.
Thanks Tom for your reply. I am currently using DirectQuery so this is an option.
I've thought about creating a new DAX table and seeing if that works as a simpler option - however that might mean more code to my 60 value columns :-).
Hey @brspencer90 ,
be aware that MSFT SQL Server currently does not support "Dynamic parameters".
Also, DAX tables will not be "re-calculated" on user interaction.
Good Luck,
Tom
Tom -
Have done some schmelting (actually came upon one of your old posts that helped me devise something that works - but also doesn't).
I was able to use a MEASURE to do basic averages on data tables that ALSO use the slicers on the dashboard.
Measures :
ID = DISTINCT(SELECTCOLUMNS(df_query,"ID",[ID]))
I want to then filter the df_query data and have a dynamic min and max on the KPI Gauge Viz. Unfortunately when I add the Value to the Gauge, it doesn't allow me to summarize (min / max) in the Visualisations Field Tab.
I now know I can't do that with a measure, so I need to figure out a few things :
I feel like I'm so close, but yet so far away. If only I could get the raw data from the Viz table I'd be set!
Hey @brspencer90 ,
unfortunately, there is a simple answer to your question - this is not possible.
This is because of the layered components Power Query queries -> Data model (tables, relationships, calculated columns) -> Measures <-> User interaction (slice & dice) con be considered a one-way path, just measures will be "re-calculated" if the filter context changes (e.g. by changing the slicer selection).
Filtering is different than re-calculating, for this reason both "activities" must not be confused.
Depending on your data source you can use Dynamic Power Query parameters, here slicer selections will be "injected" into your queries if you are using the DirectQuery connection mode: https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-dynamic-m-query-parameters#:~:text=Dy...
Hopefully, this provides some ideas on how to tackle your challenge.
Regards,
Tom
Depending on your data source