Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi,
I am trying to write a measure that counts rows of a summarized table (sum of shares purchased sold in the data table), which is filtered for a date range. My existing measure to sum shares purchased/sold to date works perfectly and is easily displayed in table form, changing dynamically with as the date slicer is adjusted. I'm trying to count the rows (there is one row per person), where the the sum of the transactions is > 0.
Data table: List of transactions with the following fields - Date, Person, Number of Shares Purchased/(Sold)
Dimension tables: Date, Person
If I use summarize and count the distinct rows, then it ignores the date slicer, which defeats the purpose (I get a count of everyone that has ever transacted, regardless of how many shares they currently own). Any ideas how I can create a measure that counts the total people with life-to-date share purchases/sales > 0 (in other words, the number of shareholders as of a certain date specified by the date slicer)?
Thank you in advance.
I have 3 tables. Calender, Person and Data.. Relationships 1 to M to Data.
If i understand you correctly, this should work for you.
Left - Month Slicer
Middle - Expected Measure
Right - Input Data table.
Measure =
VAR A = MAX('Calendar'[Date])
RETURN CALCULATE(COUNTROWS(Data),FILTER(ALL('Calendar'),'Calendar'[Date]<=A))
If it helps, mark it as a solution
Kudos are nice too
That measure is counting the number of transactions by person. I'm interested in counting the number of people with >= shares as of a specific date. For example, as of 3/1/19 in the below example, the measure would return 2 (persons A and B, because they each own shares as of that date).
If we assume person C sells all 90 shares on 11/2/19, the measure would return the following:
As of 11/1/19 = 3 (persons A,B,C)
As of 11/2/19 = 2 (persons A & B, as person C's total owned is now zero)
Thank you