Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
I want to be able to create a calculation at row level in a measure without adding a calculated column. In my Patient data, I want to calculate the sum of patients for each month but before calculating sum, I want to apply a condition at row level which is Max(Patients, 0).
I am able to achieve this using the following measure -
Solved! Go to Solution.
@Pdawar Sorry yes that will not work.
For having that flexibility to use filter from dimension row wise. You can try using CALCULATETABLE DAX function.
I tried this logic to filter but this doesn't work because the first argument of filter function is to provide the table name and in this case we are not providing a table for Product column.
@Pdawar Sorry yes that will not work.
For having that flexibility to use filter from dimension row wise. You can try using CALCULATETABLE DAX function.
@Pdawar You can apply those filter inside FILTER DAX Fuction and then apply the SUMX on that filtered table. You can try the below formula.
Max at row level =
var _filteredPatientstable = FILTER(Patients,Patients[TYPE]="Paid" && Patients[Product]="Product A")
return
SUMX(_filteredPatientstable, MAX(Patients[Patients] )
Thank you! And can filter from another table can also be applied? So the data model is star schema and the product filter needs to be applied from the Product table.
@Pdawar If the data model is star schema then you can apply the filter condition in FILER DAX function from Product dimension. But there needs to be relationship between fact and dimesion.
for example :
Max at row level =
var _filteredPatientstable = FILTER(Patients,Patients[TYPE]="Paid" && product[Product]="Product A")
return
SUMX(_filteredPatientstable, MAX(Patients[Patients] )
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
14 | |
11 | |
8 | |
8 | |
8 |
User | Count |
---|---|
22 | |
13 | |
11 | |
10 | |
10 |