Forum Discussion

cawalawan's avatar
cawalawan
New Member
4 years ago
Solved

frequency table or histogram from record level data file

Hi,  I am new to Power BI. 

I am trying to look at my data that is in a .csv record level data file -- this file is not summarized data.  I sucessfull loaded my data. I would like to create both a frequency table (just counts) and a bar chart so I can understand the distribution of my data for my column data.  I have tried this doing this by  creating a table, bring in my row data (which is a date -- and I am looking only at the year) - successful at this.  Next I want to calculate the count for each of the rows -- I created a dax formula that is 

Measure 2 = COUNT('combined-data'[CUST_SINCE].[Year])
 
My counts for each year are very different in Power BI as compare to when I do a pivot table in excel.  In power bi the measure 2 for each year is 365 or 366.  In the pivot table, the count for each year ranges from 14 to 144.  I would prefer not to summarize the data in excel or some other package. 
 
Can someone let me know what I am doing wrong or point me to a youtube or other tutorial that will give me instructions on creating a frequency table of histogram from a record level data file. 
 
I am using Power BI desktop in a windows 10 environment.
Thank you!
Cindy

2 Replies

  • Have you considered using the column quality tools in Power Query?  They give you what you want mostly for free. Or are you planning to something more elaborate like a Pearson correlation?

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi cawalawan 

    From the screenshot , you can see the difference . When you count the date row with the format ‘Table’[Date].[Year] , the value returned is the sum of all days of the year in your date . So when you count the date rows in desktop , the [unit] following the date does not need to be added .

    You can also get a better understanding of COUNT() through the following links .

    https://docs.microsoft.com/en-us/dax/count-function-dax

    https://inblog.in/Different-Types-of-Count-Functions-in-DAX-5bngj3TVme

     

    Best Regard

    Community Support Team _ Ailsa Tao

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.