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.
Hello everyone,
I have a measure with:
last sales in weeks = LASTNONBLANK('Date'[Date],[Sales])
Here I can see when the customer last ordered in weeks.
So far so good!
This i now what I have:
I also have a text field column with a "J" in it. If last sales in weeks appears a 0, I want the "J" in the text field to be deleted.
Is there a way to delete the J with a measure if the measure last sales in weeks show 0?
This is what I want:
Thank you for help.
Edited reply (forgot the function element, bsheffer, thank you):
You also need the table name if you are creating a measure from a column. Type:
NEW MEASURE = if (LASTNONBLANK('Date'[Date],[Sales]) = 0, "", FUNCTION('TABLE NAME'[VARIABLE NAME]))
where FUNCTION is, for example, MIN or MAX.
Note that the table names are surrounded by single apostrophes.
You could create a new measure to put into your table:
if (LASTNONBLANK('Date'[Date],[Sales]) = 0, "", [INSERT NAME OF TEXT VARIABLE HERE])
@AndrewPF good idea, but the problem here is the text variable which contains the "J" is a column from a SQL Database not a measure.
Your code dont work for this.
you can't blank a value in a visual otherwise. The measure is correct. replace "text variable" with your column value.
i replaced. It says: Cannot find name 'Leer_Ja_Nein' <- this is what I named my column value.
The hints from Power BI only show me measures no columns!
If this dont work, how can i convert my column into a measure, so that I can use this code?
measures aggregate so you have to wrap your column in a function like min or max
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 |
---|---|
112 | |
99 | |
82 | |
70 | |
63 |
User | Count |
---|---|
145 | |
111 | |
104 | |
84 | |
64 |