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.
Here is my structure.
Here is my "setup varejista" table
What I am trying to do :
Create a calculated column ("N5MP") in my product table that checks the setup varejista[#N] and calculates the field based on its value. And here is my product table structure:
Here is what I came up with so far, but it does not work. it always returns the else case of the switch
Not sure aboute the variable setting, not very good with DAX, because of the data structure I cannot acces the "setup varejista" from the product table in order to do the calculation, So i tought agoint checking it some other way and then bringing that value to my table...
What am I doing wrong/ how do I do this?
@Anonymous
The problem is that there is no context for the SELECTEDVALUE expression (so it sees no value).
Why do you need this as a Calculated column? You could easily do the calculation in a measure for a visual.
Proud to be a Super User!
Paul on Linkedin.
User | Count |
---|---|
17 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
9 | |
8 |