Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all,
I have theese two tables with no relationship:
Table1 Table2
I have calculated Max and Min measures for the Value column and the measure IntervalGap which is Max-Min/15
Max = MAX(Table1[Value]) Min = MIN(Table1[Value]) IntervalGap= (Max-Min)/15
I would like to count how many values of Value column (Table1) belong to each of 15 intervals (from Min to Max with step IntervalGap) creating a measure or a calculated column to add in table2 where in the Index column are listed the fifteen intervals
Index column 1 represents the interval from Min to Min+IntervalGap
Index column 2 represents the interval from Min+IntervalGap to Min+2*IntervalGap
...
How can I achieve this goal with a DAX expression?
Thanks in advance for any clue!
Solved! Go to Solution.
OK, here is what I am thinking in Table2:
Column = VAR __low = IF([Index]=1,[MinMeasure],[MinMeasure]+([Index]-1)*[IntervalGapMeasure]) VAR __high= IF([Index]=15,[MaxMeasure],[MinMeasure]+[Index]*[IntervalGapMeasure]) RETURN COUNTX(FILTER('Table1',[Value]>=__low && [Value]<=__high),[Scenario Number])
May need tweaking but something along these lines I believe.
I'm also a little bit lost reading your post.
Can you provide sample data?
Not really following this. Sample data that can be copied and pasted always helps. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490. What is the relationship between those two tables?
@Greg_Deckler I've edited original post trying to be clearer.
No relationships between two tables
OK, here is what I am thinking in Table2:
Column = VAR __low = IF([Index]=1,[MinMeasure],[MinMeasure]+([Index]-1)*[IntervalGapMeasure]) VAR __high= IF([Index]=15,[MaxMeasure],[MinMeasure]+[Index]*[IntervalGapMeasure]) RETURN COUNTX(FILTER('Table1',[Value]>=__low && [Value]<=__high),[Scenario Number])
May need tweaking but something along these lines I believe.
I was trying to make the report more configurable adding a filter by date column which is in Table1: changing date selection in the filter I'd like to have the updated values in the calculated column of Table2: how can I achieve this goal? I need a measure, right?
Thanks a lot
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |