Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I would like to create a measure which SUM headcount column based on user selecting "Fiscal Period" on the Slicer as shown below. When user select P1 and P2, the headcount gets double if i use normal SUM function, as shown below. How can I get the Expected results i.e. The sum should be based on the latest period selected in the slicer i.e. ONLY P2 in the below example, although user has selected P1 and P2.
Solved! Go to Solution.
Hi Haleem,
I would try something like this:
SUM headcount = VAR lastPeriod = MAX(Table[Fiscal Period]) RETURN CALCULATE(SUM(Table[Headcount]),Table[Fisical Period] = lastPeriod)
This should work if you have Fiscal Period as numberic value and latest period with highest value. If you do not have a such column, you can just add it as calculated column.
Regards,
kristjan76
Hi Haleem,
I would try something like this:
SUM headcount = VAR lastPeriod = MAX(Table[Fiscal Period]) RETURN CALCULATE(SUM(Table[Headcount]),Table[Fisical Period] = lastPeriod)
This should work if you have Fiscal Period as numberic value and latest period with highest value. If you do not have a such column, you can just add it as calculated column.
Regards,
kristjan76
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
84 | |
67 | |
59 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |