The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello!
I'm struggling in creating a new measure as in the following calculation:
SUM([Gap to Monthly Target] / DIM_BO_WDAYS[WORKING_DAYS]))
I tried different queries but It doesnt let me to sum the measure (Gap to Monthly Target).
Anyone have some idea to sove this?
Thanks!
Solved! Go to Solution.
Hey @Anonymous ,
a measure always returns a single value like a number. A column you have to do an aggregation like a sum.
So if I understood right [Gap to Monthly Target] is a measure, so it won't need an aggregation as it's a single value. And DIM_BO_WDAYS[WORKING_DAYS] is a column, so it needs an aggregation like sum.
If that's correct the following measure should work:
myMeasure = [Gap to Monthly Target] / SUM(DIM_BO_WDAYS[WORKING_DAYS])
Hi @Anonymous ,
If you want every rows return the sum of measure,try the below:
Measure = CALCULATE(SUMX(DIM_BO_WDAYS,[Gap to Monthly Target]),ALL(DIM_BO_WDAYS))/DIM_BO_WDAYS[Gap to Monthly Target]
Measure 2 = CALCULATE(SUMX(DIM_BO_WDAYS,[Gap to Monthly Target]),ALL(DIM_BO_WDAYS))
And then you will get the below:
Wish it is helpful for you!
If the problem is still not solved, can you pls provide your relevant data and the output you want?
Best Regards
Lucien
Hey @Anonymous ,
a measure always returns a single value like a number. A column you have to do an aggregation like a sum.
So if I understood right [Gap to Monthly Target] is a measure, so it won't need an aggregation as it's a single value. And DIM_BO_WDAYS[WORKING_DAYS] is a column, so it needs an aggregation like sum.
If that's correct the following measure should work:
myMeasure = [Gap to Monthly Target] / SUM(DIM_BO_WDAYS[WORKING_DAYS])