table filtering
2 TopicsALLEXCEPT and ALL function does not work as I expected in DAX
Hi Everyone, I'm trying to use All/Allexcept functions in some calculations for some case scenarios. I was working with Qlik & QlikSense before and this is easly applicable on Qlik but I could not manage to get this done on PowerBI. This may not be applicable on powerbi or I may not achieve to do it. Eveything explained on the last page(ALL & ALL EXCEPT Examples), but I will give summary here again. (PBIX file : GoogleDriveLink) Page : ALL & ALL EXCEPT Examples What I'm trying to do is, I want to put a few measure on a table and when I make a selection from a field, I want only some calculations get affected from that selection, and some others don't. For example, I will put Master Date as dimension and 3 different calculation on the table. I will make a selection from Service Category field and only 1th. measure will be affected from that selection and others don't. Then I will make another selection from Availability field, then 2.th measure will be affected from the selection etc... I have 4 tables. Appoinment, Marketing, Utilization, Availability. All those 4 tables merged into appointment table. Measure 1: Calculation gets affected from only determined fields in the all except function. Test Appointment Qty = CALCULATE(sum(Appointment[m_appointment_qty]) ,ALLEXCEPT(Appointment ,Appointment[dim_country_id] ,Appointment[dim_country] ,Appointment[dim_master_date] ,Appointment[dim_service_category] ,Appointment[dim_promise_met]) ,Appointment[table_type]="Appointment" ,Appointment[dim_calculation_type]="Original" ) Measure 2: Calculation will not be affected from the determined field selections. Test2 Appointment Qty = CALCULATE( sum(Appointment[m_appointment_qty]) ,ALL(Appointment[data_flag]) ,ALL(Appointment[Availability]) ,ALL(Appointment[dim_day_diff]) ,ALL(Appointment[cleaner_id]) ,Appointment[table_type]="Appointment" ,Appointment[dim_calculation_type]="Original" ) Those calculations works fine if I don't put any dimension into the table but it does not work if I put any dimension. I tried it with and without FILTER function in the calculation but I could not manage this to work with FILTER function. When I put FILTER in dax formula, FILTER function does not allow me to put multiple dimensions to tell the calculation not to affect from any selection. More detailed explanation and use cases are on the page in PBIX file. I'd be so happy if you see the file and help me to write the correct DAX formula. Thanks for your support already. Table 2 Works fine but Table 1 will not be shown if I make any selection. I attached the uses cases as well.1.8KViews0likes6CommentsHow do I filter a table to return the latest dates
I have the column below, I want to return only the max date associated with upload date. How would I achieve this in Dax? Table.1 Model Name Version Upload Date A 17/01/2023 24/01/2023 A 19/01/2023 24/01/2023 A 21/01/2023 24/01/2023 A 22/01/2023 24/01/2023 A 03/02/2023 26/02/2023 A 05/02/2023 26/02/2023 A 12/02/2023 26/02/2023 A 20/02/2023 26/02/2023 B 05/01/2023 23/01/2023 B 06/01/2023 23/01/2023 B 09/01/2023 23/01/2023 B 13/01/2023 23/01/2023 B 03/02/2023 27/02/2023 B 12/02/2023 27/02/2023 B 18/02/2023 27/02/2023 B 23/02/2023 27/02/2023 Is then transformed to Table.2 Model Name Version Upload Date A 22/01/2023 24/01/2023 A 20/02/2023 26/02/2023 B 13/01/2023 23/01/2023 B 23/02/2023 27/02/2023Solved1.3KViews0likes7Comments