The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello everyone,
I'm trying to set up a calculation where I can get the distinct count from a product per store and per date.
Im getting almost there, but when I have a store within that month and with two types, it only counts one instead of two!
This total should be 158 anod not 144. The missing 14 are the repeated ones. For example, in march, store A as type A and B, but it counts only one type
I've used this :
Solved! Go to Solution.
Hello @Greg_Deckler
Thank you for your feedback!
indeed, I tought the same with the distinct. It should be distinct store per YYYY-MM and Display.
By doing so, should be able to see distinct per type and per YYYY-MM.
I have a workaround, but perfomance wise dont know if its the best approach. I got the distinct from YYYY-MM, then the distinct from Type and for last the distinct from store.
So basically, im applying ark teste sum = CALCULATE(SUMX (DISTINCT(DimCalendar[YYYY-MM]),[arks_test])) for 3 times.
@Daavs This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
Also, the issue is likely related to your use of DISTINCT as if there are repeats, DISTINCT will only return distinct rows.
Hello @Greg_Deckler
Thank you for your feedback!
indeed, I tought the same with the distinct. It should be distinct store per YYYY-MM and Display.
By doing so, should be able to see distinct per type and per YYYY-MM.
I have a workaround, but perfomance wise dont know if its the best approach. I got the distinct from YYYY-MM, then the distinct from Type and for last the distinct from store.
So basically, im applying ark teste sum = CALCULATE(SUMX (DISTINCT(DimCalendar[YYYY-MM]),[arks_test])) for 3 times.