The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello everyone!
I have very simple table 'Result' wich has columns Date_open, Date_close and Id.
I use two filters in dashboard: Date_open and Date_close
I want to create table with 2 columns:
1. Count Id with both filters: Date_close and Date_open
2. Count Id with one filters: Date_open
I have tried this code, which has to count id without filter on Date_close, but it doesn't work(( probably I don't understand ALL function correctly
CALCULATE (COUNT(result[id]), ALL(result[Date_close]))
Solved! Go to Solution.
NEVER use a single-table models. NEVER. They work counterintuitively and many a time will return wrong numbers without you even knowing it. Always use a proper star schema. ALWAYS.
Ignoring the above will result in you creating completely unreliable models that will calculate things you won't even be able to explain.
Understand star schema and the importance for Power BI - Power BI | Microsoft Docs
If you want to know what can happen if you don't follow the advice, here's an example: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Why-one-table-models-will-produce-WRONG-NUMBE...
NEVER use a single-table models. NEVER. They work counterintuitively and many a time will return wrong numbers without you even knowing it. Always use a proper star schema. ALWAYS.
Ignoring the above will result in you creating completely unreliable models that will calculate things you won't even be able to explain.
Understand star schema and the importance for Power BI - Power BI | Microsoft Docs
If you want to know what can happen if you don't follow the advice, here's an example: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Why-one-table-models-will-produce-WRONG-NUMBE...
You shouldn't attempt these types of formulas without a Star Schema. Create lookup tables for both date columns and use those in your formulas and visuals. https://exceleratorbi.com.au/the-optimal-shape-for-power-pivot-data/
User | Count |
---|---|
11 | |
9 | |
6 | |
6 | |
5 |
User | Count |
---|---|
23 | |
14 | |
14 | |
9 | |
7 |