Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to create or use variables in calculated field so I can see the result in table.
Because I need to create another field based on result field.
Below are table example - I need Permission.Check based on below power BI dax query:
Power BI DAX Queries given below. I need syntax similar to these:-
Column1 | Column2 | Column3 | Column4 | Column5 | Permission.Check |
1 | Permission | John | Allow | Permission | |
1 | Permission | John | Allow | Permission | |
1 | Delete | John | Allow | Permission | |
2 | Permission | John | Allow | Delete | |
2 | Permission | John | Allow | Delete | |
2 | Delete | John | Allow | Delete | |
2 | Delete | John | Allow | Delete | |
3 | Permission | John | Allow | ||
3 | Delete | John | Allow | ||
4 | Permission | John | XYZ | Allow | |
4 | Delete | John | Deny |
Permissions.Check = VAR Permissions = CALCULATE(COUNTROWS(TableName),ALLEXCEPT(TableName,TableName[column1],tableName[column2])) VAR Delete = CALCULATE( COUNTROWS(TableName), FILTER( ALLEXCEPT(TableName,TableName[column1],TableName[column2]), TableName[column3]="John"&& ISBLANK(TableName[column4]) ) ) RETURN SWITCH(TRUE(), TableName[column5]<>"Allow",BLANK(), Permissions=2&&Delete=1,"Permission", Permissions=2&&Delete=2,"Delete", BLANK() ) |
Could you please review?
Can you explain in simple words, what exactly are you looking to do? Also, are you trying to do it in the script?
I need the result in permission.check column based on other columns count. Is it possible from variable or dimensions?
I am looking for the solution after the data load. Any solution?
What exactly are your condition to count? I don't understand the code that you have listed, can you put that in plain simple words also. Thanks