User Profile
Croshay
Frequent Visitor
Joined 4 months ago
User Widgets
Contributions
Re: SUM based on VAR value/ Subscription Revenue Total
It worked! Thank you so much cengizhanarslan. This feels like magic! If you have a moment to explain why this worked I'd love that, but you've done so much so I get it if you don't. I did have to add a line above _product price that was: VAR productID = Customers[Product ID] But after it worked beautifully!303Views2likes1CommentSUM based on VAR value/ Subscription Revenue Total
I want to get a total revenue measure but am having issues. I have three tables Customers and Product and Date. Relevent Fields for Customer: Company Start Date Product ID A 1/1/2020 10 B 1/1/2021 11 Product: Price ID 250 10 110 11 I have a DAX expression currently that finds the price and how many months of activity and gets me revenue based per company and per product, but not a total revenue. I want to be able to get all revenue across all companies and products and then filter with my charts later. Here is the expression I currently have. Revenue = VAR company = SELECTEDVALUE(Customers[Company]) VAR productID = SELECTEDVALUE(Customers[Product ID]) Var firstPayment = 1 Var startdate = SELECTEDVALUE(Customers[Start Date]) Var endDate = MAX(__Dates[Date]) VAR productPrice = CALCULATE( VALUES( 'Product'[Price] ), 'Product'[ID] = productID ) VAR dateDifference = DATEDIFF(SELECTEDVALUE(Customers[Subscription Date]), endDate, MONTH ) VAR paymentMonths = IF(dateDifference >= 0, dateDifference+firstPayment, 0) Return SUMX(Customers, paymentMonths*productPrice) How can I get a regular SUM() to work with it. I know some people got CALCULATETABLE(SUMMERIZE()) to do this, but when I tried that I kept getting error messages.Solved353Views2likes3CommentsMeasure IF statement for each row
Hi! New to PowerBI and need some help. My understanding basic understanding of columns Vs measures is that columns are set when created and measures allow for more flexability for filtering. Which is why I'm trying to accomplish this with a measure. I have two tables both with only text fields. The first Table1 contains all possible options and tagging, the second Table 2 is a user input field that allows selections of choices. I want to be able to map the selections from Table2 onto Table1 for a comparision. My current thought is to create a measure for Table1 that will put a "1" if that value was selected (present in Table2 when filtered by user) and "0" if not selected. My current DAX function looks like this: clientSelectionValues = VAR clientChosen = CONCATENATEX( VALUES(Table2), Table2[company], ",") VAR clientFeatures = CONCATENATEX( FILTER(Table2, Table2[company] = clientChosen), [feature], ",") RETURN IF( CONTAINSSTRING(clientFeatures, Table1[feature]), 1, 0) I know the issue is that this function wants a single number output. I don't know how to fix it though. I've tried borrowing the solution from Calcule similarity between two item but I think that this solution relays on the yes/no field already present that I do not have.Solved668Views0likes3Comments
Data Privacy
Microsoft Fabric Community and Privacy
To learn more about how we manage your data, please review the Microsoft Fabric Community Data Privacy guide.