cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
fabianhenzler Frequent Visitor
Frequent Visitor

Calculated Column/Measure to count releases per year per product

Screenshot: https://db.tt/O22dCVA5

 

As shown in the Screenshot in Dropbox, I want to create a new column that evaluates the amount of releases for a given year. So in the end I create a column for 2014, 2015, 2016, 2017, ...

Each of the columns shall contain the amount of releases per year. Each release has a complete release date.

 

I can't figure out how to create an additional column in the Products Table to show the amount of releases per year.

I need this for a KPI Card to indicate the increase or decrease regarding to the last year.

 

Thanks in advance for your help 🙂

 

1 ACCEPTED SOLUTION

Accepted Solutions
BhaveshPatel Super Contributor
Super Contributor

Re: Calculated Column/Measure to count releases per year per product

You just have to use COUNTROWS function.

 

MyMeasure:=COUNTROWS(Releases)

 

For Calculated Column for individual years, Create a Year Column in Your Releases Table using,

 

Release Year=Year(Releases[Date])

 

Create Calculated Column Using Calculate For Individual Year

 

2014 Releases=CALCULATE([MyMeasure],Releases[Release Year]="2014")

 

You can also use SWITCH Function to count all the releases in one single column.

 

For detailed information on how to use SWITCH, please refer to this blog,

http://www.powerpivotpro.com/2012/06/dax-making-the-case-for-switch/

 

 

 

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

View solution in original post

1 REPLY 1
BhaveshPatel Super Contributor
Super Contributor

Re: Calculated Column/Measure to count releases per year per product

You just have to use COUNTROWS function.

 

MyMeasure:=COUNTROWS(Releases)

 

For Calculated Column for individual years, Create a Year Column in Your Releases Table using,

 

Release Year=Year(Releases[Date])

 

Create Calculated Column Using Calculate For Individual Year

 

2014 Releases=CALCULATE([MyMeasure],Releases[Release Year]="2014")

 

You can also use SWITCH Function to count all the releases in one single column.

 

For detailed information on how to use SWITCH, please refer to this blog,

http://www.powerpivotpro.com/2012/06/dax-making-the-case-for-switch/

 

 

 

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

View solution in original post

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)