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 September 15. Request your voucher.
Hi All,
Here I present what I deem to be perfect code, which should work flawlessly, and bear no errors.
But... I wouldn't be here if that was the case. The logic checks out and all the parameters work, yet as if being sabotaged by some mischievous data-ghost, the ironclad laws of Power BI are broken. Call me superstitious.
If someone could tell me what I've done wrong I'd be gripped to know as these KPIs have a deadline of 2 days and I've spent 4 hours cringing and raging in frustration over one analysis field.
I am attempting to change a category of an account based on age at any given time, dynamically adjusted for the slicer range, which I can then use as a slicer in itself (thus it cannot be a measure).
Here are my variables:
As you can see, all parameters except AccountCatagory are calculated correctly. the expected output here is 'Embedded', following the logic, 8<= AccountAge <365, where AccountAge is 14.
Debugging this, we are presented with the following;
This blatantly contradicts the actual output.
Please can someone advise on this.
Thanks in advance 😀
It appears your calculated column is based on measures. Calculated columns don't recognize user-specified filters such as slicers, which may explain the unexpected results.
Proud to be a Super User!
Thanks, is there a way around this? or a different way to achieve my goal?
You could create a disconnected AccountCategory table with one row per category. Then use this table in a visual and use DAX (measure) to control filtering. Your calculated column logic could be adapted to work in a measure. Are you able to post a link to a sample pbix (OneDrive, etc.)?
Proud to be a Super User!
User | Count |
---|---|
69 | |
68 | |
64 | |
54 | |
28 |
User | Count |
---|---|
112 | |
81 | |
65 | |
48 | |
43 |