Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Super beginner question: how do you use a single data source?

 

Hi Everyone,

 

I'm sorry to post such a basic question but for the life of me I cannot get any results via google or on stackoverflow about what I'm trying to do, which is use a single data source in Power BI. One excel file with one tab that has all of the data I need on it. It looks something like this, but with many more columns and client identifiers:

 

Post image

 

Essentially what I want to do in Power BI is create measures that are complicated countifs such as counts of clients by their latest enrollment and gender and turn that into a pie chart with each slice representing the different gender options and a data label for how many rows use that gender option. I can do that in Excel but I'm super new to Power BI. I can do this in Tableau but I am trying to make a printable/PDF format report (don't ask...)

 

I've watched a few videos on youtube but the problem I'm running into is that I'm not sure how I'm supposed to divide my data up to create relationships because each row is a unique enrollment in a project of a single client at one point in time. Most videos and tutorials I've seen are business/sales based (makes sense since I know this is the bulk of Power BI's userbase) but I was wondering if anyone could point me in the right direction of information about using a single source in Power BI OR how to break up a single source into multiple tables?

 

Thank you so much!

2 Replies

  • MattAllington's avatar
    MattAllington
    Community Champion

    You can use a single flat table for simple datasets, but it is not considered best practice and it will definitely make the DAX harder with more complex datasets. 

     

    Ideally you should aim for a star schema, as I covered here https://exceleratorbi.com.au/the-optimal-shape-for-power-pivot-data/

     

    You can create this using power query on data load. Just connect to the sheet, import the data and then set that table so it doesn’t load “right click, turn off enable load”. Then you create a data table and lookup tables from there, “right click, reference”

  • v-xicai's avatar
    v-xicai
    Community Support

    Hi Anonymous ,

     

    >>Essentially what I want to do in Power BI is create measures that are complicated countifs such as counts of clients by their latest enrollment and gender and turn that into a pie chart with each slice representing the different gender options and a data label for how many rows use that gender option.

     

    I am not sure what desired result would you want, could you please share your sample data and desired output screenshots for further analysis? You can also upload sample pbix to OneDrive and post the link here. Do mask sensitive data before uploading.

     

    Please read this post to get your answer quickly: How to Get Your Question Answered Quickly.

     

    Best Regards,

    Amy