cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 385 members 3,693 guests
Please welcome our newest community members: