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.
How do we create scripts in power bi?
For example, if I want to create if statement, do i just create a New column and type the if statement, or is there a seperate scripting space?
Solved! Go to Solution.
Right click your Ediables column in Field Pane, select New Group, and there you can Select Strawbery and Mango and Name it as Fruits. You can create other group as well.
Thanks
Raj
Hi @Anonymous
Power BI uses DAX language for this purpose. You need to create Either Calculated column, Measure or DAX table to use the DAX code.
You can right click your table name in the Field pane and create new column/ Measure to use DAX.
Alternatively, go to Modelling tab and create them.
Thanks
Raj
thank you!
However, I am not able to access a variable from the particular table while creating a measure. Suppose I have the table animal and I need to access a variable under it for my if statemet, then creating a measure does not help me do this.
Is there a solution for this?
@AnonymousYou create variables in Column and measure my using syntax Var map so map is the varaible name
Is that a new variable?
This is my situation. Suppose I have loaded an Excel file called 'Things'. Under Things, I have a column called 'Edibles'. So I need to create a new group called 'Fruits.'
Something like.. if (edibles = apple or edible = mango) as fruits.
This is what I want to perform.
@Anonymous Can you provide sample data?
Ya, my table looks something like this. The excel file is called as things.
Edibles Living Non-Living
Chocolate A B
Strwaberry X Y
Mango Humans Pen
So i want a group: if edibles = strawberry or mango, then it should be under a new group called fruits
Right click your Ediables column in Field Pane, select New Group, and there you can Select Strawbery and Mango and Name it as Fruits. You can create other group as well.
Thanks
Raj
Thank you!
I think you refer measure as variable here.
Create a calculated column and try.
Please share sample data in editable format, if you need further help on this.
Thanks
Raj
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 |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |