emma
emma

Reputation: 804

PowerBI custom visual: create a new field from two fields

I'm trying to create a custom visual in app.powerbi.com (not desktop). I have csv data in the following format and I want to create a new variable, length, from the two timestamp values, when there is an end value. When there is no end value, a string will be assigned instead.

ref activity    timestamp start timestamp end
num1    stage1  01/10/2016 17:00    
num1    stage2  02/10/2016 15:00    03/10/2016 10:00
num1    stage3  03/10/2016 17:00    
num1    stage4  04/10/2016 13:00    
num2    stage1  04/10/2016 09:00    
num2    stage3  04/10/2016 16:00    04/10/2016 20:00
num2    stage4  05/10/2016 12:00    

I think this means I need to import ALL the data and process it in javascript. Doing it this way, I think I'm limited to 30,000 rows.

But I'd like to know if some combination of grouping and dataReductionAlgorithm in capabilities.json (or anything else) will let me grapple with two fields, to product a single output.

Reduce() in crossfilter would let me specify how to group and aggregate the data, and I thought dataReductionAlgorithm might be the same, but it seems not.

Does anyone know of a way of pre-processing the data to calculate a value from two fields, in powerBI? Thanks

Upvotes: 0

Views: 230

Answers (1)

Jan Pieter Posthuma
Jan Pieter Posthuma

Reputation: 331

Power BI visual will always be limited in the amount of datapoint that will be available. Main reason: all those datapoints are processed by the client in JS and will slow down the Power BI experience.

Power BI is a BI tool and groups (aggregates) the data before it is send to the visual. In your custom visual you define the entrypoints of the visual datapoints for that grouped data via the capabilities.json file. Notice the dataRoles, kind options: measure and/of grouping.

Basically you have to determine what kind of information do I need for my custom visual. For instance: if you want to shown the duration of your activities, you can create a measure in Power BI and use that measure in your visual.

If you need more help, let me know.

-JP

Upvotes: 2

Related Questions