relations management
4 TopicsHelp with relashionship in Variables
Hello ppl, It麓s my first post here soI麓m gonna try to explain everything in details. 馃檪 I have to create a measure to calculate the percent of a value that has 'rolled' from the last month and from the last range and show it result in a table by Month and each range. Measure: % VPL Rolagem Teste Valor Condicional teste = --First step defining variables from last month and each range: VAR VPLMESANSEMATRASO = CALCULATE([VPL Rolagem M-1],'Hist贸rico'[Faixa_atraso_M-1]="", USERELATIONSHIP(_dimFaixaAtraso2[Faixa], 'Hist贸rico'[Faixa_atraso_M-1])) VAR VPLMESAN1A4 = CALCULATE([VPL Rolagem M-1],'Hist贸rico'[Faixa_atraso_M-1]="1-4", USERELATIONSHIP(_dimFaixaAtraso2[Faixa], 'Hist贸rico'[Faixa_atraso_M-1])) VAR VPLMESAN5A29 = CALCULATE([VPL Rolagem M-1],'Hist贸rico'[Faixa_atraso_M-1]="5-29", USERELATIONSHIP(_dimFaixaAtraso2[Faixa], 'Hist贸rico'[Faixa_atraso_M-1])) VAR VPLMESAN30A59 = CALCULATE([VPL Rolagem M-1],'Hist贸rico'[Faixa_atraso_M-1]="30-59", USERELATIONSHIP(_dimFaixaAtraso2[Faixa], 'Hist贸rico'[Faixa_atraso_M-1])) VAR VPLMESAN60A89 = CALCULATE([VPL Rolagem M-1],'Hist贸rico'[Faixa_atraso_M-1]="60-89", USERELATIONSHIP(_dimFaixaAtraso2[Faixa], 'Hist贸rico'[Faixa_atraso_M-1])) VAR VPLMESAN90A119 = CALCULATE([VPL Rolagem M-1],'Hist贸rico'[Faixa_atraso_M-1]="90-119", USERELATIONSHIP(_dimFaixaAtraso2[Faixa], 'Hist贸rico'[Faixa_atraso_M-1])) VAR VPLMESAN120MAIS = CALCULATE([VPL Rolagem M-1],'Hist贸rico'[Faixa_atraso_M-1]="+ 120", USERELATIONSHIP(_dimFaixaAtraso2[Faixa], 'Hist贸rico'[Faixa_atraso_M-1])) --First step defining variables from current month and each range: VAR VPLMESATSEMATRASO = CALCULATE([VPL Rolagem],'Hist贸rico'[Faixa_atraso]="",'Hist贸rico'[Rolagem]="Rolagem", USERELATIONSHIP(_dimFaixaAtraso2[Faixa], 'Hist贸rico'[Faixa_atraso])) VAR VPLMESAT1A4 = CALCULATE([VPL Rolagem],'Hist贸rico'[Faixa_atraso]="1-4",'Hist贸rico'[Rolagem]="Rolagem", USERELATIONSHIP(_dimFaixaAtraso2[Faixa], 'Hist贸rico'[Faixa_atraso])) VAR VPLMESAT5A29 = CALCULATE([VPL Rolagem],'Hist贸rico'[Faixa_atraso]="5-29",'Hist贸rico'[Rolagem]="Rolagem", USERELATIONSHIP(_dimFaixaAtraso2[Faixa], 'Hist贸rico'[Faixa_atraso])) VAR VPLMESAT30A59 = CALCULATE([VPL Rolagem],'Hist贸rico'[Faixa_atraso]="30-59",'Hist贸rico'[Rolagem]="Rolagem", USERELATIONSHIP(_dimFaixaAtraso2[Faixa], 'Hist贸rico'[Faixa_atraso])) VAR VPLMESAT60A89 = CALCULATE([VPL Rolagem],'Hist贸rico'[Faixa_atraso]="60-89",'Hist贸rico'[Rolagem]="Rolagem", USERELATIONSHIP(_dimFaixaAtraso2[Faixa], 'Hist贸rico'[Faixa_atraso])) VAR VPLMESAT90A119 = CALCULATE([VPL Rolagem],'Hist贸rico'[Faixa_atraso]="90-119",'Hist贸rico'[Rolagem]="Rolagem", USERELATIONSHIP(_dimFaixaAtraso2[Faixa], 'Hist贸rico'[Faixa_atraso])) VAR VPLMESAT120MAIS = CALCULATE([VPL Rolagem],'Hist贸rico'[Faixa_atraso]="+ 120",'Hist贸rico'[Rolagem]="Rolagem", USERELATIONSHIP(_dimFaixaAtraso2[Faixa], 'Hist贸rico'[Faixa_atraso])) I麓ve check until this part and it麓s working, but when I define the parameter to calculate, apparently the DAX cannot identify a relashionship between the VARIABLES I麓m trying to divide in the If's. --This parameter I defined to specify which range it should calculate the variable. VAR MAXID = max(_dimFaixaAtraso2[Id]) --Here the conditional to calculate in the table according to the range. RETURN IF(MAXID=1, DIVIDE(VPLMESAT1A4, VPLMESANSEMATRASO), IF(MAXID=2, DIVIDE(VPLMESAT5A29, VPLMESAN1A4), IF(MAXID=3, DIVIDE(VPLMESAT30A59, VPLMESAN5A29), IF(MAXID=4, DIVIDE(VPLMESAT60A89, VPLMESAN30A59), IF(MAXID=5, DIVIDE(VPLMESAT90A119, VPLMESAN60A89), IF(MAXID=6, DIVIDE(VPLMESAT120MAIS, VPLMESAN90A119), BLANK() )))))) My relashionships between the tables: The result without the collumns with ranges: I'd appreciate if would someone try to help me 馃檪 Thank you. Felipe381Views0likes1CommentIssues with slicer and custom shape map
I created a Choropleth map with mapshaper.org. Its a topojson. It inported into Power BI without any issues. But i am not able to use the slicer to create filters or any color in the map. I looked at the the data and found tha most of it was just comming in as a list I created an referance sheet which I thought would work for the Slicer and color and could be connected to the map data unfortuanly the I cant manage the relationship to hook them together becasue the list data will not match the table data. Is there a way to expland out the topojson so that i can match teh data or create bew veriables from the Topojson? (I have blured out the company informtation but teh feilds of area manager and State exsist in both the map and the referance sheet)663Views0likes0CommentsDatamodeling in PowerBI - Relation on different Product ID Patterns
Hello, Need some assistance with Datamodeling in PowerBI Image there are table with Product ID and Profit from different countrys. The Product ID Pattern in each table is different but contains the same number, like GB_2323GR F2323 D-2323 How could i map (create a relation) this tables with the product ID 2323 in this example and compare the profits in a report?