Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi there,
I would like to calculate the total number of contracts for a specific type of branch when I select a customer.
Like shown on the screenshot I select the customer in the bar chart. In the table below his number of contracts (2) and the total number of contracts for his branch (6) is shown.
So far the numbers are correct, but I don't want the other branches to be shown. I just want to see the branch of the selected customer. My Dax function is the following:
Contracts per branch = CALCULATE( DISTINCTCOUNT( SalesTable[contract_ID] ),
ALL( Customers ) )
I guess the problem is generated through the "All (Customers)" part - first I tried using "All (Customers[Customer_ID])", but this only calculates the number of contracts for the selected customer.
I hope you can help me. Thanks in forward.
Why do you call Contracts per Branch "Durchschnittlicher Branchenverbrauch"? Looks like a field mismatch to me.
Create a separate measure (or even a calculated column) that computes the total number of contracts and/or the total consumption, and then reference that measure in your calculation.
Sorry, I addmit the field name might be confusing. The overall goal of the measure is to calculate the "mean consumption per branch". The total number of contracts is just part of the solution. If I get this part right the rest is easy to transfer.
I already tried using a separate measure for the total number of contracts and referrenced it within the shown calculation. The result was the same. The calculation returns the right number of total contracts per branch for the selected customer, but it also shows all branches and not only the branch of the selected customer.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
71 | |
37 | |
21 | |
19 | |
13 |
User | Count |
---|---|
125 | |
40 | |
32 | |
27 | |
24 |