measure multiplication
4 TopicsWhy use a return inside a sumx
Hello, I've seen this pattern to create a measure and I don't understand how we can make a return before the end of the sumx ? Sales PQ := IF ( [ShowValueForDates], SUMX ( VALUES ( ‘Date’[Fiscal Year Quarter Number] ), VAR CurrentFiscalYearQuarterNumber = ‘Date’[Fiscal Year Quarter Number] VAR DaysSelected = CALCULATETABLE ( VALUES ( ‘Date’[Day of Fiscal Quarter Number] ), REMOVEFILTERS ( ‘Date’[Working Day], ‘Date’[Day of Week], ‘Date’[Day of Week Number] ), ‘Date’[DateWithSales] = TRUE ) RETURN CALCULATE ( [Sales Amount], ‘Date’[Fiscal Year Quarter Number] = CurrentFiscalYearQuarterNumber - 1, DaysSelected, ALLEXCEPT ( ‘Date’, ‘Date’[Working Day], ‘Date’[Day of Week] ) ) ) )Solved1.3KViews0likes4CommentsUnable to mutiply lookup value in measure
Hi all, need some help as I am unable to mutiply value that lookup to another table . Here are the measure created : var first_rate = LOOKUPVALUE(Tariff_Info[Price (RM)],Tariff_Info[ID],1) var second_rate = LOOKUPVALUE(Tariff_Info[Price (RM)],Tariff_Info[ID],2) var price_first_rate = IF([4.Daily Energy Chiller 2] = BLANK(), 0 , [4.Daily Energy Chiller 2] * first_rate) var price_second_rate = IF([4.Daily Energy Chiller 2] = BLANK(), 0 ,([4.Daily Energy Chiller 2] - 200) * second_rate) var total = IF([4.Daily Energy Chiller 2] = BLANK() || [4.Daily Energy Chiller 2] < 200 , price_first_rate, price_first_rate + price_second_rate ) return total result i am getting : result i am expecting : table that i lookup : If i manually add the value for first rate into the measure , i am able to produce expected result. Any idea on why i am unable to use variable to store and use the value that i want. Thanks, HairulSolved738Views0likes3CommentsHow to deduct cents from a rate column and the multiply that value for a total volume in Power BI?
Hi Group, I’m new to Power BI and I’m trying to replicate from Tableau the below formula into Power BI. Can anyone please tell me how to create a measure in Power BI for the below formula? Formula in Tableau: Table Name: Bpay_Biller Columns: DR Chg Rate Debit Account Volume (0.88 - [DR Chg Rate]) * [Debit Account Volume] Thanks for your help ☺️!Solved841Views0likes2CommentsMultiplying Single Values by A Measured Column Total in Table
I have numeric values (1,2,3,4,etc) in one column, and I want to multiply each of these values by the total of a different, measured column. Is this possible within Power BI? For example, in Power BI, I utilized the distinct count formula to give me the distinct count of shipments ( "Distinct Count (Y)" ). I also have basic column that gives me the total cost of that shipment ( "X" ). Then, I created a measure that divided Total Cost by the Distinct Count of Shipments ( "X/Distinct Count (Y)" ). Now, I have another column that has difference in the distinct count of shipments between this month and last month ( "Z" ). My goal is to multiple each of the values in "Z" by the total of "X/Distinct Count Y". The total of "X/Distinct Count Y" is basically the overall average cost per shipment. Hope this explanation helps. I created this example in excel to visualize what I am looking to accomplish.1.2KViews0likes2Comments