Calculate a column help

Used for anything related to the new Power BI Desktop and Service tools
gs0706
Posts: 2
Joined: Sat Feb 17, 2018 5:20 am

Calculate a column help

Postby gs0706 » Thu Apr 26, 2018 11:00 pm

I want to populate each row of this table (NumDays) with the count of rows from this table that have the value of KEY1. I have this working by extrapolating the data from an additional table we added but I'd like to not have to do that. How do I do this?
Attachments
Adding Column.docx
(38.84 KiB) Downloaded 21 times

andredl
Posts: 59
Joined: Wed Sep 23, 2015 9:56 pm

Re: Calculate a column help

Postby andredl » Sun Jul 01, 2018 6:06 pm

Assuming your data table is called "NumDays", which is what I understand from your description, and that you want the frequency (count) of each value appearing in the column labelled "KEY1", which is again what I understand from your description, you can get this count in a calculated column, by writing

=CALCULATE(COUNT(NumDays[KEY1]),FILTER(NumDays,NumDays[KEY1]=EARLIER(NumDays[KEY1])))


Return to “Power BI Desktop/Service”

Who is online

Users browsing this forum: No registered users and 1 guest

cron