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 everybody !
Here is my table :
I want to create a measure with another value named A (which is constant) divide by my second column named B. In fact, I have a slicer with each dates but when I diselected my date, there is All.
I want when All appear on my slicer, a measure with A divide by the last B here 615.
So I try :
C = IF (
DISTINCTCOUNT ( 'Données'[Date] ) = 1;
SUM ( B);
Lastnonblank(B;"")
))
It worked but it divide A by 600 (november 2017), so strange..
Thanks
Best regards
David
Solved! Go to Solution.
Hi @DavidB023
I make a test with your data on my site.
Create measures
Measure = CALCULATE(LASTDATE(Sheet1[year]),ALL(Sheet1))
Measure 2 = CALCULATE(LASTNONBLANK(Sheet1[B],1),FILTER(ALL(Sheet1),[year]=[Measure]))
Measure 3 = DIVIDE(615,[Measure 2])
Best Regards
Maggie
Hi @DavidB023
I make a test with your data on my site.
Create measures
Measure = CALCULATE(LASTDATE(Sheet1[year]),ALL(Sheet1))
Measure 2 = CALCULATE(LASTNONBLANK(Sheet1[B],1),FILTER(ALL(Sheet1),[year]=[Measure]))
Measure 3 = DIVIDE(615,[Measure 2])
Best Regards
Maggie
Hi @v-juanli-msft,
Thanks a lot for your solution !
Finally I used your Measure and Measure2 and I inject in :
Measure3 = DIVIDE( A ;
IF( DISTINCTCOUNT ( 'Sheet1'[year] ) = 1 ;
B ;
[Mesure2]
))
It works like I want,
Thanks
Best regards
David
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 |
---|---|
111 | |
97 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |