Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi PBI,
I have a requirement to pass in Selected Value (Slicer Selection) into the TOPN function into the TOPN function.This is a Sample Format in which my Data isis
The Filter Selection from where the user would make a Selection (Single Select will be enabled)
Problem:
The User would be Selecting a Week in the Above Filter. Once The user make a Selection in the Above Filter I would need to pass it into a Summarize Function which is encapsulated over a TOPN function. Basically the Output thats expected is for me to have the TOP 10 Channels based on Views for the Selected Week.
Expressions that is resolving
TOPN(SUMMARIZE(FILTER(TABLE, TABLE[Year&Week]= "2019w23", TABLE[CHANNEL],"SUM Views", SUM(Views) ),[SUM Views], DESC)
Expressions that I am using which is not resolving the Calculated Table for Top 10 Channels for the Selected Week
TOPN(SUMMARIZE(FILTER(TABLE, TABLE[Year&Week]= SELECTEDVALUE(YEAR&WEEK[Year&Week])), TABLE[CHANNEL],"SUM Views", SUM(Views) ),[SUM Views], DESC)
Output Expected:
If the User Selects the Week as 2019W23 , then this is the Output Expected.
PS. I am open to any method that would resolve the Top 10 Channels for a Selected Week.
Solved! Go to Solution.
The table/matrix visual in PBI lets you show only TOPN items based on a measure... and a DAX measure cannot return a table, it can only return a value.
By the way, please read upon the SUMMARIZE function because clearly, you're completely unaware of the traps that it presents. Go to www.sqlbi.com and look for SUMMARIZE.
Best
Darek
The table/matrix visual in PBI lets you show only TOPN items based on a measure... and a DAX measure cannot return a table, it can only return a value.
By the way, please read upon the SUMMARIZE function because clearly, you're completely unaware of the traps that it presents. Go to www.sqlbi.com and look for SUMMARIZE.
Best
Darek
User | Count |
---|---|
25 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
27 | |
13 | |
11 | |
9 | |
6 |