Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi everyone,
It works fine, if no attributes or dimensions are used, the metric gets the number of people from the last date of fact_date:
it corresponds to the code:
The problem comes when entering another field, in this case the end of contract date (end_contract_date), which I have converted to string on source database to avoid other problems.
In this case, the metric doesn't work and when the fact_date date is not used, it gets values previous to the last fact_date date.
This behavior is not valid. The metric should exclude data for end_contrac_date values '19991231' that corresponds to a date before (2019-11-30), only should gets data for the last date of fact_date (2019-12-31).
Could someone help me to solve the error? I have used this type of metric on various tables and they work correctly except from this metric. The HHRR table is not related to any table and is not a model problem.
I don't exactly yet understand the issue... but I can tell you that your model is not a good one. Please watch these to see how to create good, reliable and correct models:
Bear in mind that if you don't follow the Best Practices you'll be having bugs in your calculations without even realizing this. This is not a joke. Please read this to see what issues you can face:
https://www.sqlbi.com/articles/understanding-dax-auto-exist/
Also, please note that each and every sound, good model needs to have a DATE TABLE and slicing by columns of a fact table is strictly forbidden. Slicing can be only carried out through dimensions. You should have all columns in your fact tables HIDDEN.
Best
D
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
24 | |
20 | |
15 | |
13 |
User | Count |
---|---|
55 | |
48 | |
43 | |
19 | |
19 |