Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi, i have dax measure for calculated column like this
RealisasiEkvUSDCumTest:= VAR MaxDate = CALCULATE(MAX(DimDate[Date]) , RELATEDTABLE(FactInvestment)) RETURN CALCULATE ( SUM ( FactInvestment[RealisasiEkvUSD]), FILTER ( ALLSELECTED(DimDate), DimDate[Date] <= MaxDate) ) |
but, i want remove that month have no value like image below (blank value is Oct-Dec), Thanks ...
Solved! Go to Solution.
Hi,
See below;
RealisasiEkvUSDCumTest:=
VAR MaxDate = CALCULATE(MAX(DimDate[Date]) , RELATEDTABLE(FactInvestment))
RETURN
If (is blank(sum(FactInvestment[RealisasiEkvUSD]) ) = true(), blank(),
CALCULATE (
SUM ( FactInvestment[RealisasiEkvUSD]),
FILTER (
ALLSELECTED(DimDate),
DimDate[Date] <= MaxDate)
))
Proud to be a Super User!
Awesome Keyboard Shortcusts in Power BI, thumbs up if you like the article
My Community Blog Articles (check them out!)
My Blog - Power M code to automatically detect column types -
How to create test data using DAX!
You can try the following formula
RealisasiEkvUSDCumTest:=
VAR _MaxDate = CALCULATE(MAX(DimDate[Date]) , RELATEDTABLE(FactInvestment))
RETURN
IF( SELECTEDVALUE(DimDate[Date])<=_MaxDate ,
CALCULATE (
SUM ( FactInvestment[RealisasiEkvUSD]),
DATESYTD(DimDate[Date]))
)
You can try the following formula
RealisasiEkvUSDCumTest:=
VAR _MaxDate = CALCULATE(MAX(DimDate[Date]) , RELATEDTABLE(FactInvestment))
RETURN
IF( SELECTEDVALUE(DimDate[Date])<=_MaxDate ,
CALCULATE (
SUM ( FactInvestment[RealisasiEkvUSD]),
DATESYTD(DimDate[Date]))
)
Hi,
See below;
RealisasiEkvUSDCumTest:=
VAR MaxDate = CALCULATE(MAX(DimDate[Date]) , RELATEDTABLE(FactInvestment))
RETURN
If (is blank(sum(FactInvestment[RealisasiEkvUSD]) ) = true(), blank(),
CALCULATE (
SUM ( FactInvestment[RealisasiEkvUSD]),
FILTER (
ALLSELECTED(DimDate),
DimDate[Date] <= MaxDate)
))
Proud to be a Super User!
Awesome Keyboard Shortcusts in Power BI, thumbs up if you like the article
My Community Blog Articles (check them out!)
My Blog - Power M code to automatically detect column types -
How to create test data using DAX!
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
8 | |
7 |