lod
3 TopicsIssues with level of detail calculation using a relationship model
I have 2 tables related. Table A (Maestro de partes) is the dimensional table, where each SKU code (NOPARTE) and brand group (CodMarca) is located. Table B (Liq 3M) is the fact table, stores the transacction at the SKU and date level from each import process in the last 3 months. I need to calculate the sum of the import costs over the FOB factory price at the brand group level. I also need this value to remain the same whether I disaggregate it per SKU or brand group. Here is the formula I'm using considering the filters I need for this calculation: Factor de importacion = CALCULATE( ([Total costos de importacion]/SUM('Liq 3M'[FOB unit liquid]) + 1), FILTER( 'Liq 3M', 'Liq 3M'[Via transporte] = 2 && 'Liq 3M'[Datediff aplicacion] > 0 && 'Liq 3M'[Datediff aplicacion] < 4 ), ALLEXCEPT( 'Maestro Partes', 'Maestro Partes'[CodMarca] ) ) https://1drv.ms/u/s!Ar7k80093sB_gckbSsUJKl9osviTWw?e=VfMKnh This is what I get: This is what I need: Any help will be appreciated!722Views0likes2CommentsHow do i convert the tableau LOD Calculation to Power BI. I am not getting the desired output.
I have a LOD calculation in tableau as below. {FIXED [Casenumber],[Adobe Date],[Account_Name__C],[Contact_Name__C],[Case Created Date],[Fiscal Date],[SEARCH_TERM],[Asset Name] : COUNTD(IF ([Scenario (trim)] = 'Web activities but No Case Created') THEN [Casenumber] END) } It returns a distinct count of casenumbers based on the columns mentioned in the fixed syntax. I tried converting the same in Power bi using the below DAX. But i am not getting correct output. Self_service_success = CALCULATE(DISTINCTCOUNT('TB'[CASENUMBER]),'TB'[SCENARIO]="Web activities but No Case Created",ALLEXCEPT('TB','TB'[CASENUMBER],'TB'[V05_DATE],'TB'[ACCOUNT_NAME__C],'TB'[CONTACT_NAME__C],'TB'[CREATEDDATE],'TB'[FISCAL_MONTH],'TB'[V02_SEARCH_TERM],'TB'[V20_ASSET_NAME])) Is there any other way in which i can convert the LOD to power bi DAX measure?1.5KViews0likes3CommentsSum of expression to respect LOD
Hi, I can't figure out a DAX statement that would correctly sum results of another expression. I've built a table visual, in which [Expression] is a simple IF statement which checks if sum of [Metric] is lower or equal than a set maximum value (i.e. [Cap]) and then returns either the sum or [Cap] TABLE VISUAL 1 Dim A Dim B Sum of Metric Cap Expression A A1 3 5 3 A A2 4 5 4 A A3 7 5 5 A A4 100 5 5 B B1 12 12 12 B B2 14 12 12 B B3 7 12 7 B B4 25 12 12 The Expression goes like this: Expression = IF ( SUM([Metric]) > MIN([Cap]), MIN('DataTable'[Cap]), SUM([Metric]) ) Now I would like to build another table visual that would correctly sum [Expression] by Dim A and would be possible to filter by other dimensions in the Data Tabe (Dim C, D, E... that are not used in the visual) TABLE VISUAL 2 Dim A Sum of Expression A 17 B 43 I tried CALCULATE with SUMX and ALLEXCEPT on [Dim A] and [Dim B] but results make no sense. In Tableau I would probably use something like SUM({FIXED [Dim A],[Dim B]:[Expression]}), but I'm struggling to replicate this logic in DAX. What would be the correct DAX for [Expression] and [Sum of Expression]?Solved1.5KViews0likes6Comments