powerbi community
28 TopicsSummarize table Lookupvalue in Funnel Visual
Hi Everyone, i have the below summarized table "Cover Type Analysis" as per the below : CoverTypeAnalysis = SUMMARIZE('Production ReportV20-V1 Power B','Production ReportV20-V1 Power B'[Cover Type],'Production ReportV20-V1 Power B'[Transaction Year],"Total Premium",SUM('Production ReportV20-V1 Power B'[Cedent Premium])) i have created a new column LastYear: LastYear = IFERROR(FORMAT(CoverTypeAnalysis[Transaction Year],"General Number") - 1,0) i need to calculate PercentageYearlyGrowthByCoverType: PercentageYearlyGrowthByCoverType = DIVIDE(CoverTypeAnalysis[Total Premium] - LOOKUPVALUE(CoverTypeAnalysis[Total Premium],CoverTypeAnalysis[Transaction Year],CoverTypeAnalysis[LastYear], CoverTypeAnalysis[Cover Type],CoverTypeAnalysis[Cover Type]), ABS(LOOKUPVALUE(CoverTypeAnalysis[Total Premium], CoverTypeAnalysis[Transaction Year],CoverTypeAnalysis[LastYear], CoverTypeAnalysis[Cover Type],CoverTypeAnalysis[Cover Type])))/100 i have Transaction Year a Slicer Filter = 2019, everything looks wonderfull and the Funnel is looking correct: I was asked after that to add Quarter and Month Filters to this report, i added them to the summarized table : CoverTypeAnalysis = SUMMARIZE('Production ReportV20-V1 Power B', 'Production ReportV20-V1 Power B'[Cover Type], 'Production ReportV20-V1 Power B'[Transaction Year], 'Production ReportV20-V1 Power B'[Transaction Quarter], 'Production ReportV20-V1 Power B'[Transaction Month], "Total Premium",SUM('Production ReportV20-V1 Power B'[Cedent Premium])) and adjusted PercentageYearlyGrowthByCoverType to be as per the below: PercentageYearlyGrowthByCoverType = DIVIDE(CoverTypeAnalysis[Total Premium] - LOOKUPVALUE(CoverTypeAnalysis[Total Premium], CoverTypeAnalysis[Transaction Year],CoverTypeAnalysis[LastYear], CoverTypeAnalysis[Transaction Quarter],CoverTypeAnalysis[Transaction Quarter], CoverTypeAnalysis[Transaction Month],CoverTypeAnalysis[Transaction Month], CoverTypeAnalysis[Cover Type],CoverTypeAnalysis[Cover Type]), ABS(LOOKUPVALUE(CoverTypeAnalysis[Total Premium], CoverTypeAnalysis[Transaction Year],CoverTypeAnalysis[LastYear], CoverTypeAnalysis[Transaction Quarter],CoverTypeAnalysis[Transaction Quarter], CoverTypeAnalysis[Transaction Month],CoverTypeAnalysis[Transaction Month], CoverTypeAnalysis[Cover Type],CoverTypeAnalysis[Cover Type])))/100 however im getting wrong results as if it excecute the formula for each row and at the it sums all percentages while what i want is to make the calculation for all selected values: also i tried to create a mesure but it returned empty and couldnt load it into Funnel Visual PercentageYearlyGrowthByCoverType mesure = DIVIDE(SUM(CoverTypeAnalysis[Total Premium]) - LOOKUPVALUE(CoverTypeAnalysis[Total Premium], CoverTypeAnalysis[Transaction Year],SELECTEDVALUE(CoverTypeAnalysis[LastYear]), CoverTypeAnalysis[Transaction Quarter],SELECTEDVALUE(CoverTypeAnalysis[Transaction Quarter]), CoverTypeAnalysis[Transaction Month],SELECTEDVALUE(CoverTypeAnalysis[Transaction Month]), CoverTypeAnalysis[Cover Type],SELECTEDVALUE(CoverTypeAnalysis[Cover Type])), ABS(LOOKUPVALUE(CoverTypeAnalysis[Total Premium], CoverTypeAnalysis[Transaction Year],SELECTEDVALUE(CoverTypeAnalysis[LastYear]), CoverTypeAnalysis[Transaction Quarter],SELECTEDVALUE(CoverTypeAnalysis[Transaction Quarter]), CoverTypeAnalysis[Transaction Month],SELECTEDVALUE(CoverTypeAnalysis[Transaction Month]), CoverTypeAnalysis[Cover Type],SELECTEDVALUE(CoverTypeAnalysis[Cover Type]))))/100 appreciate your urgent assistance Thank you in advance Best regards, Georges SabbaghSolved770Views0likes1Comment7-day rolling sum issue with slicer
Hi everyone, I am having some issueswith my DAX code. I have an Excel table named 'MyTable' that I use as a dataset. In this table there are several columns, including one for dates (from 2019 to 2021) and one for the number of orders I have per day. I wanted to create a 7-day rolling sum the returns for a given day the number of orders for the current day and the 6 days before. Here is an example: Date Orders 7-day rolling sum for orders Jan 1st 5 5 Jan 2nd 2 7 Jan 3rd 6 13 Jan 4th 3 16 Jan 5th 7 23 Jan 6th 4 27 Jan 7th 2 29 Jan 8th 3 27 Here is an example of the kind of results I am supposed to get. Here, for Jan 8th, I should get the sum of Jan 8th + the 6 days before. My DAX formula is the following: Orders 7DR Sum = CALCULATE( SUMX('MyTable',MyTable[Orders]), DATESINPERIOD(MyTable[Date], LASTDATE(MyTable[Date]), -6, DAY) ) Technically it works if I show the entire data on my Power BI dashboard. However, I need to use slicers on my dashboard to filter the data. The problem with the slicer is that if I ask it to filter the data for february 2019 for example, the formula will start the sum at the beginning of february. Leading to the first 7 days of the chart being wrong. How can I modify my DAX formula so that it still considers the dates outside of the slicer? Thank you very much.1.2KViews0likes3CommentsCreating weighted statistics in DAX
Hi guys, Unfortunately i dont have idea how to resolve my problem. So i have 2 tables: IDA Group A 1 B 1 B 2 B 2 B 2 C 3 The second one: IDA Counts A 2 B 4 C 4 So i would like to count from those table weighted statistics by group i mean: For group 1: ((1/2)+(1/4)+(0/4))/3 = 25% For group 2: ((0/2)+(3/4)+(0/4))/3 = 25% for group 3: ((0/2)+(0/4) + (1/4))/3 = 8.3% I would like to create is as a measure, but as i mention before i don't have idea. I tried by sumx and summarised but i didn't get any rational results. Thanks in advance for your help.Solved685Views0likes1CommentDAX based on same date and same field
Hi Im a bit new to dax and I am struggling in creating a formula. So I need to write a mathmateical calculation which =+(E4+Mx6)/2*33 for the East Silo on the same date and time only. So the first one would be 07/11/2022 4:30 am calculation (4+4)/2*33423Views0likes1CommentWhite borders export Power BI to PowerPoint
Hi, I have a problem with exporting my Power BI report to PowerPoint, when I export my Power BI report from the Power BI service to PowerPoint I have white borders on the right and left side. Is there somebody who could help me? I tried to change the background in "canvas settings" but I get extra white borders on the top and bottom in PowerPointSolved1.8KViews0likes1Commentcalculate time difference between two timstamp columns in direct query mode in PowerBI
I need to calculate the time difference between two timestamp columns in my table and create a new column with the calculated values but as I'm doing this in the direct query mode, I have some limitations for it. I tried datediff, duration.totalseconds etc but nothing really worked.. the result I want is I got this result using the sql below select (unix_timestamp(timestamp1)-unix_timestamp(timestamp2))/3600 as hourly_diff from azure_anomaly_detection_pilot.ops_log Could anyone help me on this? Thank you!Solved2.5KViews0likes3CommentsPublishing PowerBI reports on Windows RDS using specific credentials
Is there a way to publish PowerBI reports to Windows RDS environment using embedded credentials? We would like the report to run under the same credential no matter who opens it from the RDS site. Is that possible? If so, how?Solved609Views0likes1Comment