Forum Discussion
Measure does not show same value in different Visuals
- Anonymous10 months ago
Hi Luggas,
If the issue still persists, we kindly request you to share the sample data in a workable format such as text, an Excel file, or a PBIX file with sample data instead of screenshots. Additionally, please include the expected output. This will enable us to assist you more effectively.
Regards,
Prasanna Kumar
Hi, I have to give you some more context about my data Modell
My Source table looks almost like the one you shared rohit1991, thanks for that.
In addition it has a cummulative YTD Capacity for each employee for each row of that column and anotherone with a proportional capacity per month per employee.
Therefore I was able to write the following measure for each categorized hours written. E.g. that would be the Measure code for Visual_Volum1, that would be the same approach for the other Volumes. Here is some Code zenisekd :
VISUAL_Volum1 =
VAR Prod_hours =
CALCULATE(
SUM(Table[hours]),
F1_Final[Category] IN {
"Volum1" //Filter for Hours, that are categorized in Volum1
}
)
// Calculation of the entire Monthly capacity
VAR DistributionCapacity =
SUMX(
SUMMARIZE(
Table,
Table[PersNr], // Group by PersNr, to summarize the Capacity per employee
Table [Month],
"CapacityperMonth",
CALCULATE(
// Selects a distinct value of Monthly capacity per employee
FIRSTNONBLANK(Table [capa_per_month], 1)
)
),
[CapacityperMonth]
)
// Divide the Prod_hours with the correct summarized Monthly capacity
RETURN DIVIDE(Prod_hours, DistributionCapacity, 0)