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.
When doing a subtotal with measure customer counts we are getting an incorrect value. From the data it is showing we should have a subtotal of 4577 and what the actual subtotal is showing is 4554. The measure I'm using to get the customer count is:
Customer Counts = CALCULATE(DISTINCTCOUNT(Connections[Account Number]), Connections[End Fractional] = 0)
The data has some account numbers multiple times if they have multiple services. So I need to pull the total number of account numbers minus duplicates and the "End Fractional" should always be zero. I've put this data in a table and a matrix and still get the same result. I would assume it has to do with the formula but I'm not sure what is incorrect about it.
Solved! Go to Solution.
Hi @mattyj2009
Create a calculated column
Column = CALCULATE(DISTINCTCOUNT(Sheet1[account]),FILTER(ALLEXCEPT(Sheet1,Sheet1[area]),[end]=0))
Create a measure
discount =
VAR filtered =
FILTER ( ALLEXCEPT ( Sheet1, Sheet1[area] ), [end] = 0 )
VAR countb =
CALCULATE ( DISTINCTCOUNT ( Sheet1[account] ), filtered )
RETURN
IF (
HASONEVALUE ( Sheet1[area] ),
countb,
SUMX ( VALUES ( Sheet1[Column] ), [Column] )
)
Best Regards
Maggie
Hi @mattyj2009
Create a calculated column
Column = CALCULATE(DISTINCTCOUNT(Sheet1[account]),FILTER(ALLEXCEPT(Sheet1,Sheet1[area]),[end]=0))
Create a measure
discount =
VAR filtered =
FILTER ( ALLEXCEPT ( Sheet1, Sheet1[area] ), [end] = 0 )
VAR countb =
CALCULATE ( DISTINCTCOUNT ( Sheet1[account] ), filtered )
RETURN
IF (
HASONEVALUE ( Sheet1[area] ),
countb,
SUMX ( VALUES ( Sheet1[Column] ), [Column] )
)
Best Regards
Maggie
I think this will work if I can figure out the dates. Inside of my data that I pull from I have a date column. I have a slicer that we can change the dates on to pull data for that specific date.
Hi @mattyj2009
Sorry to bother you, would you give some feedback if my solution works for you, if not, what's wrong with it, or is there anything else you need?
Best Regards
Maggie
I was able to get it to work with the solution provided. Thanks!
Here is similar post for you reference, hope it will help to get you going.
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.
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 |
---|---|
85 | |
84 | |
65 | |
62 | |
55 |
User | Count |
---|---|
171 | |
109 | |
105 | |
73 | |
71 |