Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
stanleycj
Helper I
Helper I

fill the values based on the condition

Dear's,

 

I have a data in the table as given below. for each month the type "x" will have a cumulative value as highlighted.

 

tabletable

 

The output which i am getting as per the data is correct. (Ref: below screenshot)

output which i am gettingoutput which i am getting

 

But, we need to present the report as shown below. Means: I need to fill the Type x value for all the codes.

expected outputexpected output

 

Tried with switch command, but i couldn't make out.

 

Looking for expert advise.

3 REPLIES 3
stanleycj
Helper I
Helper I

Dear @wdx223_Daniel ,

Greetings!

I could able to achive through merging the table by powerquery and its working fine. Thank you for your support.

wdx223_Daniel
Super User
Super User

=IF(MAX(Table[Type]="X",CALCULATE([YourMeasure],Table[Code]=""),[YourMeasure])

Dear @wdx223_Daniel ,

 

Already, i tried with the below statement, but it doesn't workout. Could you please correct me if i am wrong.

Thank you so much for your quick response.

IF (SELECTEDVALUE(Data_Tbl[Type]) = "EXCEL",
DIVIDE(
CALCULATE(
SUM('Data_Tbl'[value]),
'Data_Tbl'[Type] = "EXCEL",
'Data_Tbl'[misdate] = SELECTEDVALUE(Data_Tbl[misdate]),
'Data_Tbl'[st] IN { 1 }
)
, 1000000)
,
DIVIDE(
CALCULATE(
SUM('Data_Tbl'[value]),
'Data_Tbl'[st] IN { 1 }
)
,1000000)
)

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.