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.
Hello,
i need create new column: values under same project (rivile_code) show all values with type "Faktas" in column "Tipas", and then values with type "Planas" only if on the same day there is no values with type "Faktas". i.e. on 2020-06-30 - 76500,65 ..... but in 2021-05-31 - 73636,36 and so on.
thank you for help.
Solved! Go to Solution.
@Anonymous try this in a calculated column
=IF(Table[Tipas]="Planas")&&Table[value],IF(COUNTROWS(FILTER(Table,Table[Tipas]="Faktas"&&Table[Data]=EARLIER(Table[Data])&&Table[rivile_code]=EARLIER(Table[rivile_code]))),"Yes","No"))
Hi, @Anonymous , you might want to try this formula in a calculated column
Column =
VAR __t =
CALCULATETABLE (
'Table',
ALLEXCEPT ( 'Table', 'Table'[rivile_code], 'Table'[Data] )
)
VAR __t_faktas =
FILTER ( __t, 'Table'[Tipas] = "Faktas" )
RETURN
IF (
COUNTROWS ( __t_faktas ),
CALCULATE ( MAX ( 'Table'[value] ), __t_faktas ),
CALCULATE ( MAX ( 'Table'[value] ), FILTER ( __t, 'Table'[Tipas] = "Planas" ) )
)
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
just thanked but stucked after next few steps til nice finish. Asking for help about wrong total in matrix. I watched all videos and post's about that problem, but in all of them there are too simple examples, and in my situation can't find how to apply them. Thank you in advance.
Formula for better understanding:
Thank you for your time and solution guys! Good day.
Hi, @Anonymous , you might want to try this formula in a calculated column
Column =
VAR __t =
CALCULATETABLE (
'Table',
ALLEXCEPT ( 'Table', 'Table'[rivile_code], 'Table'[Data] )
)
VAR __t_faktas =
FILTER ( __t, 'Table'[Tipas] = "Faktas" )
RETURN
IF (
COUNTROWS ( __t_faktas ),
CALCULATE ( MAX ( 'Table'[value] ), __t_faktas ),
CALCULATE ( MAX ( 'Table'[value] ), FILTER ( __t, 'Table'[Tipas] = "Planas" ) )
)
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
@Anonymous , Try a new column like
if(isblank([values]) ,
sumx(filter(Table, [Tipas] ="Planas" && [rivile_code] = earlier([rivile_code]) && [Data] =earlier([Data])),[values]),[values])
@Anonymous try this in a calculated column
=IF(Table[Tipas]="Planas")&&Table[value],IF(COUNTROWS(FILTER(Table,Table[Tipas]="Faktas"&&Table[Data]=EARLIER(Table[Data])&&Table[rivile_code]=EARLIER(Table[rivile_code]))),"Yes","No"))
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
24 | |
9 | |
7 | |
6 | |
6 |
User | Count |
---|---|
29 | |
11 | |
11 | |
10 | |
6 |