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

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.

Reply
adnanarain
Helper V
Helper V

Need help with Power bi Measures

Hi Please see below data. Basically i want to calculate 3 things. 1st is APV, APS and Measure or Calculated Column:

I have Year Slicer on page: Year Slicer selected as All

APV = if category is "LEN" and year is Current (Current year 2020) then Count LEN

APS = Category is LEN and Count of LEN 2021 and 2022

 

if we select Year from slicer 2021 then:

APV = LEN count of Year 2021 and then APS will be LEN count of Year 2022 and so on

 

and last measure or calculated column: the LEN of Current year will become SPN for Next year so i want to count growth and this will also involve year slicer selection.

 

Sorry if i am still not clear, let me know if you need more detail. Thanks in advance for your help

 

 

CategoryYear
Len2020
Len2020
Len2021
Len2020
Len2021
Len2021
Len2021
Len2020
Len2022
Len2022
Len2022
Len2022
SPN2020
SPN2021
SPN2022
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Try this

 

Count of SpN=calculate(count('table'[category]),filter('Table','Table'[category]="SSN" && table[year]=selectvalue(dummy_table[column])))+

calculate(count('table'[category]),filter('Table','Table'[category]<>"SSN" && table[year]=selectvalue(dummy_table[column])-1))

 

Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar

If I resolve your problem Mark it as a solution and give kudos.

 

View solution in original post

10 REPLIES 10

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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