Quantcast
Channel: All Developer posts
Viewing all articles
Browse latest Browse all 48903

Getting filtered grouping values in custom visual

$
0
0

Hi,

 

I'm writing a custom visual and want to allow the following scenario:

 

1) User picks several grouping columns for the visual

2) These are auto-filtered by other visuals/report filters etc

3) My custom visual gets the distinct values of each grouping column and uses them

 

My inital plan was to have several dataRoles

"dataRoles": [
        {
            "displayName": "Group1",
            "name": "group1",
            "kind": 0
        },
	{
            "displayName": "Group2",
            "name": "group2",
            "kind": 0
        }
        , etc
    ]

 and then have several dataViewMappings

"dataViewMappings": [
	{
		"conditions": [
		    { "group1": { "min": 1, "max": 1 } }
		],
	        "table": {
	            "rows": {
	                "for": {
	                    "in": "group1"
	                }
	            }
	        }
       }
//repeat for other groupings
]

but sadly Power BI will only return one dataView in the visual.update() so it seems for now this will not work

    https://github.com/Microsoft/PowerBI-visuals/blob/master/Capabilities/DataViewMappings.md

 

Is there an alternate way to get the lists I'm after?

 

I considered crossjoining all the columns, but it there are many then the data set size will soon become massive. (especially when the report is first opened and no filters have been applied)

 

Thanks


Viewing all articles
Browse latest Browse all 48903


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>