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.
Hi,
I was hoping someone could help. I`m building a report to show promotions split by job family, and then further by gender.
I have written 3 x measures:
1. Promotions_count = CALCULATE(COUNT('Promotions- all data'[Res/Grp]))
This gives me the number of promotions
2. Promotions F = CALCULATE([Promotions_count], FILTER('Promotions- all data','Promotions- all data'[Gender]="female"))
This gives me the number of promotions for women
3. Promotions M = CALCULATE([Promotions_count], FILTER('Promotions- all data','Promotions- all data'[Gender]="Male"))
This gives me the number of promotions for men
When I add these 3 to a table visualisation I get the table below. The Promotions_count has worked has expected but the Promotions F, and Promotions M look really weird. The total of the two had up to the total of Promotion_count but the values in the columns dont add up to the column totals?
Please see the link to the .pbix below. Any help is much appreciated.
Thanks,
Brendan
Hi @Bfaws,
You can try to use below measure formulas if they suitable for your requirement:
Promotions F =
CALCULATE (
[Promotions_count],
FILTER (
ALLSELECTED ( 'Promotions- all data' ),
'Promotions- all data'[Gender] = "female"
),
VALUES ( 'Promotions- all data'[Job Family] )
)
Promotions M =
CALCULATE (
[Promotions_count],
FILTER (
ALLSELECTED ( 'Promotions- all data' ),
'Promotions- all data'[Gender] = "Male"
),
VALUES ( 'Promotions- all data'[Job Family] )
)
Regards,
Xiaoxin Sheng
@Bfaws try this
Promotions M = CALCULATE([Promotions_count], 'Promotions- all data'[Gender]="Male")
Promotions F = CALCULATE([Promotions_count], 'Promotions- all data'[Gender]="Female")
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi
Thanks for measures. They worked for the sample i gave but i was not able to replicate in my real data and I think this is because what i shared only has one year. Please see .pbix below which now contains 2 years data - i`m unable to reconcile the columns with two years data and your measures (or mine).
Please see some screenshots below - the issue is relating to Job family. If i run the measures looking at date only, or grade only it balances perfectly but when I add Job family into the mix the columns dont match the totals (which are correct)
This table is correct:
This table is correct:
This table incorrect - with Job Family added (Promotions M(2) is your measure and there are additional entries in column)
Thanks,
Brendan
HI @Bfaws,
I think this should more relate to your 'job familiy' field and relationship mapping, it existed 'NA' values and your field aggregated to expands that records.
If you don't want to display, you can add a condition or filter to ignore the calculation on blank 'job familiy'.
Relationships in analysis services tabular models
What is the Direction of Relationship in Power BI?
Regards,
Xiaoxin Sheng
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 |
---|---|
97 | |
94 | |
74 | |
71 | |
64 |
User | Count |
---|---|
143 | |
109 | |
103 | |
82 | |
74 |