Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
We were recently exploring Field Parameter (Preview). This is nice. But something that our client requested is, following (... and seems Field Param is not capable to address it!)
So, we are having a table [TABLE_FIELDMAP] with columns like below, where there is a mapping between which column is relevent to Which category
SPORT | FIELD |
CRICKET | RUN, WICKET, CATCH, TROPHY_WON, MAJOR_ACHIEVEMENT |
FOOTBALL | GOALS, TROPHY_WON, MAJOR_ACHIEVEMENT |
Next we have [TABLE_RECORDBOOK] with following
PLAYER | YEAR | SPORT | RUN | WICKET | CATCH | GOALS | TROPHY_WON | MAJOR_ACHIEVEMENT |
SAM | 2021 | CRICKET | 810 | 11 | 6 | NULL | 2 | Orange Cap |
SAM | 2022 | CRICKET | 667 | 4 | 8 | NULL | 0 | NULL |
ROB | 2022 | FOOTBALL | NULL | NULL | NULL | 9 | 2 | NULL |
STEVE | 2021 | CRICKET | 256 | 0 | 7 | NULL | 0 | Young Talent |
The requirement is:
There should be a slicer called [Sport] which will show all available Sport(s). Upon selecting a value from that Slicer, there should be a table/matrix where, we'd see [Player], [Year], [Sport] AND Only those column(s) which are applicable to that sport. i.e. when Foolball is selected - then only [Goals] & [Trophy_Won] should be visible (and not Run/ Catch/ Wicket - etc.)
~ by the way, obviously above two table(s) are here for illustration only. In reality both having a lot of rows and categories. So... a solution with [hard coded column names] etc. not possible.
Has anyone addressed such issues please? If so, kindly share some clue. Thanks a lot in advance.
Solved! Go to Solution.
Hi,
You may download my PBI file from here.
Hope this helps.
Hi,
Considering in the second table there will be a number only under the relevant column, I do not see the relevance of the first table. In the Query Editor, you should select the first 3 columns, right click and select "Unpivot Other Columns". Create a slicer of Sport and select Football. Create a matrix visual with Player, Year in the row labels and Attribute in the Column labels. Write this measure
Total = sum(Data[Value])
Hope this helps.
Thumbs Up!
Thanks @Ashish_Mathur . Your solution is almost what we need. But a few additional elements are there, where I believe my question (or the example) didn't clarify fully, so I apologies for that.
SPORT | FIELD |
CRICKET | RUN, WICKET, CATCH, TROPHY_WON, MAJOR_ACHIEVEMENT |
FOOTBALL | GOALS, TROPHY_WON, MAJOR_ACHIEVEMENT |
PLAYER | YEAR | SPROT | RUN | WICKET | CATCH | GOALS | TROPHY_WON | MAJOR_ACHIEVEMENT |
SAM | 2021 | CRICKET | 810 | 11 | 6 | NULL | 2 | Orange Cap |
SAM | 2022 | CRICKET | 667 | 4 | 8 | NULL | 0 | NULL |
ROB | 2022 | FOOTBALL | NULL | NULL | NULL | 9 | 2 | NULL |
STEVE | 2021 | CRICKET | 256 | 0 | 7 | NULL | 0 | Young Talent |
~ Again I apologies, because I am trying hard to give a good example and I guess this above one could be considered better. The whole point is - Table 1 Should drive which column to display for which sport from Table 2.
Its NOTthe text/numeric /Null data points in Record table to decide which column to display.
Hi,
You may download my PBI file from here.
Hope this helps.
a solution with [hard coded column names] etc. not possible.
Then what do you call your reference table with sports and columns? That's not hardcoded?
Field parameters can achieve the goal you state. You should also consider enabling "Peronalize Visuals" and teach your users how to use that feature. It does the sameas Field Parameters, and then some.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
87 | |
85 | |
82 | |
66 | |
49 |
User | Count |
---|---|
137 | |
111 | |
101 | |
66 | |
65 |