简体   繁体   中英

Power Bi Power Query best practice

I have a large volume of CSV data that is imported and transformed, one of the columns has a range of values from 1-19, and is an age-group identifier (0-4,5-9,10-14,...,80-84,85+,age unknown).

My questions is

"Is it best to add DAX code (likely a switch command) to make 1 = 0-4, 2 = 5-9,..., or is it better to do this in a different manner?"

I know how to accomplish this in the import/transform data area, I'm looking for a better practice to consider.

"If there is a better practice, can you please describe why the other method is deficient and the proposed better?"

PowerBI already has some in-built support that allows you to group multiple numeric values together called "Grouping" and "Binning" . You can probably use that.

But wrt best practice is think you need to compare the three approaches and see what works best for you

  1. "Grouping" or "Binning" - PowerBI takes care of it for you, but it may not be exactly what you're looking for.
  2. DAX - this could impact the performance of the visual interactivity or loading
  3. Power Query - This will simplify the performance with visuals, but will add time to make this transformation on every refresh.

What works for you will depend on what you're ready to accept.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM