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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

0

Calculation as per month

Hello Team,

i am having 3 columns
1. Dimension date column
2. Count as per month.
3. Total cost per month.

my requirment is i want to calculate
addition of count per month 
eg 
Jan count divide by january cost.
Feb + Jan Count divide by February cost.

What measure should i use can anybody please suggest.

Best Regards,
Sagar Shah

Status: Delivered

Hi @Anonymous ,

 

Please try :

measure=

var _a = calculate(count('table'[count]),filter(all(table),'table'[date]<=eomonth(max('table'[date]))))

var _b = sum('table'[cost])

return divide(_a,_b)

 

Best regards.
Community Support Team_ Caitlyn

Comments
v-xiaoyan-msft
Community Support
Status changed to: Delivered

Hi @Anonymous ,

 

Please try :

measure=

var _a = calculate(count('table'[count]),filter(all(table),'table'[date]<=eomonth(max('table'[date]))))

var _b = sum('table'[cost])

return divide(_a,_b)

 

Best regards.
Community Support Team_ Caitlyn

Anonymous
Not applicable

Hey Caitlyn,

I tried to utilize the formula but not working,

Can you show me one use case it would be helpfull.

Thanks,
Sagar Shah