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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Convert this Cognos expression to Power BI Dax

Could you please help me to convert the below Cognos expression to Power BI DAX ASAP

 

1.)Current Period Sales = Case
When [Drops Fact Fiscal - Security].[Date - Fiscal].[Fiscal Year] = ?pYear? and [Drops Fact Fiscal - Security].[Date - Fiscal].[Fiscal Period]= ?pPeriod? then [Drops Fact Fiscal - Security].[Fact Sales and Drops - Fiscal].[Invoice Sales]
Else 0
End

 

2.)Prior Period Sales = Case
When ([Drops Fact Fiscal - Security].[Date - Fiscal].[Fiscal Year]=cast(cast(?pYear?,integer)-1,varchar(10)) and [Drops Fact Fiscal - Security].[Date - Fiscal].[Fiscal Period]=?pPeriod?)
Then [Drops Fact Fiscal - Security].[Fact Sales and Drops - Fiscal].[Invoice Sales]Else 0
End

 

3.)Total Cases Vs. Prior Year = Case
When ([Drops Fact Fiscal - Security].[Date - Fiscal].[Fiscal Year]=cast(cast(?pYear?,integer)-1,varchar(10)) and [Drops Fact Fiscal - Security].[Date - Fiscal].[Fiscal Period]=?pPeriod?)
Then [Drops Fact Fiscal - Security].[Fact Sales and Drops - Fiscal].[Invoice Cases]
Else 0
End

 

4.)Total Cases = Case
When [Drops Fact Fiscal - Security].[Date - Fiscal].[Fiscal Year] = ?pYear? and [Drops Fact Fiscal - Security].[Date - Fiscal].[Fiscal Period] = ?pPeriod?
Then [Drops Fact Fiscal - Security].[Fact Sales and Drops - Fiscal].[Invoice Cases]
Else 0
End

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

I'm very sorry.   Can you give these formulas the output you want? Or you can tell me what output you want for each formula and under what conditions?

 

How to Get Your Question Answered Quickly 

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.