March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi All,
I have to calculate Area per Headcount in my Report for sites and buildings. However, I have area for some sites and headcount also for only some sites.
I have 2 tables. One is People Report and the other table is Area Report.
People Report:
#Key is a custom column which I created by merging Site code and Building.
Area Report:
There's a third table too (Dimension Table) which contains only 1 column i.e. #Key (merge of Site & Building)
My data model looks like below.
I am using the below dax to calculate Area per Person.
And my table in the front end looks like below.
It's good so far. However, I want to show Area per Person in a Card basis Area & Headcount of those sites and buildings for which both are available i.e. Area per Person basis AA##1, AA##2, AB##1, AC##2 in the above image.
Please help!
Link to PBIX: https://drive.google.com/file/d/1EmwvQg0NAh6UCgPE9CBgMYpE14Pc32Bx/view?usp=sharing
Solved! Go to Solution.
Hi @simrantuli ,
Please check if this is what you want:
Best regards
Icey
If this post helps, then consider Accepting it as the solution to help other members find it faster.
Hi @simrantuli ,
Please check if this is what you want:
Best regards
Icey
If this post helps, then consider Accepting it as the solution to help other members find it faster.
VAR HeadcountAvailable = ISBLANK(SUM(Headcount))
VAR AreAvailable = ISBLANK(SUM(Area))
RETURN
IF(
AND(
HeadCountAvailable = FALSE(),
AreaAvailable = FALSE()
),
DIVIDE(
SUM([Area]),
SUM([Headcount]),
BLANK()
),
BLANK()
)
This doesn't work?
DIVIDE(
SUM([Area]),
SUM([Headcount]),
BLANK()
)
Hi @littlemojopuppy ,
I want to divide them only if both area & headcount are available in that particular site & building combination. Any thoughts on how we can achieve it?
Create two variables, in each check that numerator and demonimator are not blank. Then check that both are true, and if so divide
I am sorry if I am asking for too much but can you please write the dax for me. I am very new to Dax. It would be a great help to me. Thanks.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
86 | |
76 | |
57 | |
52 |
User | Count |
---|---|
201 | |
137 | |
108 | |
73 | |
68 |