Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello,
I have to insert into below function as a table measure all values that are selected in slicer.
So for example, i ve selected on slicer yellow, green and black and as variable named [selectedbyfiltervalue] i ve got results as a table expresion {yellow, green, black}
TableResult =
VAR __DS0FilterTable =
TREATAS(
{ "STAR 21.08.06.##",
"STAR 21.08.20.##"},
'Distinct Fix'[fixVersions.name BLANK]
)
VAR __DS0FilterTable2 =
TREATAS(
{ "STAR 21.12.10.##",
"STAR 22.01.07.##"},
'Distinct Affected'[AffectedVersion BLANK]
)
VAR __DS0Core =
SUMMARIZECOLUMNS(
ROLLUPADDISSUBTOTAL('SLS Agile'[Key], "IsGrandTotalRowTotal"),
__DS0FilterTable,
__DS0FilterTable2,
"OR_Distinct", 'SLS Agile'[OR Distinct]
)
VAR __DS0PrimaryWindowed =
TOPN(502, __DS0Core, [IsGrandTotalRowTotal], 0, 'SLS Agile'[Key], 1)
Return
SELECTCOLUMNS(__DS0PrimaryWindowed,'SLS Agile'[Key])
I ve got this code which BI generated for me and in general it retuns proper values, but what i wanted to do is to put instead of TREATAS, the realtime values that i select by slicers. So if i change values in slicers, data in that TableResult measure also change in real time.
TableResult is normal measure not calculation table.
Hi @michal_boro ,
To confirm, are you attempting to generate a calculated table in which the outcomes of chosen values in a slicer are incorporated as new rows? If this is your intent, I must clarify that it isn't possible. Calculated tables refresh exclusively when the primary data changes or when alterations are made to the formula itself, not in response to filtering in visuals. Consequently, slicer selections won't impact a calculated table. However, there might be a misunderstanding regarding your requirements. Could you provide further details, including a functional data sample (not in image form), and outline your expected outcomes using that data?
I ve prepared .pbix sample but dont know how to attacht it to repley 😞 i ve got pop up informing .pbix file is not supported
Hi, @michal_boro
You can put your files in a dropbox, onedrive or googledrive folder and share the link with the community.
Best Regards,
Yang
Community Support Team
you can use the concatenatex function .
measure =
var s = values( tbl_name[col_name])
return
concatenatex ( s , tbl_name[col_name]) , ",")
let me know if that works for you .
If this answers your question , mark it as the solution ✅ so can you can help other people in the community find it easily .
User | Count |
---|---|
85 | |
82 | |
66 | |
53 | |
47 |
User | Count |
---|---|
102 | |
50 | |
42 | |
39 | |
38 |