Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Adding a calculated column to display monthly totals

Hi there,

I have the data as seen below but I would like to add 2 columns to it, 1 is the first of each month that is in the data and the second is the total for the month of each license per site.

In the example below, the extra columns for july would be 01/07/21 for the column to show the first of the month and for example Houdini Core for Sydney the monthly maximum would be 4.

AddCustomColumn.JPG

 

Just not sure how to construct the Dax to come up with the first of each month then the sum of the site and different monthly maximum for the licenses.

I know this is more than likely fundamental and I have been looking at tutorials, Dax just isn't happening for me.

 

Thank you.

 

1 ACCEPTED SOLUTION

@Anonymous 

try this

MonthlyTotal = calculate(min(count),allexcept(tblLicenseExpiry,tblLicenseExpiry[Site],tblLicenseExpiry[License]))





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

5 REPLIES 5
ryan_mayu
Super User
Super User

@Anonymous 

1. you can try this

column=date(year('date),month('date'),1)

2. not sure if i understand your request clearly.

coumn=calculate(sum(count),allexcept(table,site,liscence,column)





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Hey there, 

the first one worked so now I see the first of each month for the weeks of those months in a new column, but the second one didn't.

 

I have tried this

MonthlyTotal = calculate(sum(count),allexcept(tblLicenseExpiry,tblLicenseExpiry[Site],tblLicenseExpiry[License],tblLicenseExpiry[Current]))
 
But keep getting syntax errors relating to the bracket?
Anonymous
Not applicable

My mistake there was a typo in what I was doing.   Also, apologies I worded the second part of the question completely wrong.  The new 'MonthlyTotal' column should be the lowest value for the month for a site and piece of software.

MonthlyTotal.JPG

 

In this example the monthly total for July for Sydney Houdini FX would be 16 as that is the lowest value in the 'Count' column for that product for the month of July.  Sorry I was getting my requests mucked up.  

 

So the second new column is the lowest number for the month for the combo of Site and License based on checking against Count.

@Anonymous 

try this

MonthlyTotal = calculate(min(count),allexcept(tblLicenseExpiry,tblLicenseExpiry[Site],tblLicenseExpiry[License]))





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




@Anonymous 

calculate (sum(tblLicenseExpiry[count]),XXXX

count is the column name in your table.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors