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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
bbbbbiiiii
Helper II
Helper II

Measures did not show up in the table

Question:

Hi all, I am trying to make the previous year measures to appear in the table. The dax I use is

Attrition Rate Last Year = CALCULATE([Attrition Rate Overall], DATEADD('Headcount'[Period],-1,YEAR))


but, when I apply it to the table, the value don’t show up. Any reason?

 

bbbbbiiiii_0-1627703387490.png

 

7 REPLIES 7
m3tr01d
Continued Contributor
Continued Contributor

@bbbbbiiiii Are you doing the DATEADD on you date column?

m3tr01d
Continued Contributor
Continued Contributor

I mean, the one in the Date table

ERD
Super User
Super User

In order to use any time intelligence calculation, you need a well-formed date table. The Date table must satisfy the following requirements:

  • All dates need to be present for the years required. The Date table must always start on January 1 and end on December 31, including all the days in this range. If the report only references fiscal years, then the date table must include all the dates from the first to the last day of a fiscal year. For example, if the fiscal year 2008 starts on July 1, 2007, then the Date table must include all the days from July 1, 2007 to June 30, 2008.
  • There needs to be a column with a DateTime or Date data type containing unique values. This column is usually called Date. Even though the Date column is often used to define relationships with other tables, this is not required. Still, the Date column must contain unique values and should be referenced by the Mark as Date Table feature. In case the column also contains a time part, no time should be used – for example, the time should always be 12:00 am.
  • The Date table must be marked as a date table in the model, in case the relationship between the Date table and any other table is not based on the Date.

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

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

Check out my latest demo report in the data story gallery.

Stand with Ukraine!


Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

Thanks @ERD 

 

I created the Date table and Link it to the date column required. The measure still dont appear.. 

@bbbbbiiiii ,

you can try to use SAMEPERIODLASTYEAR

 

PY_Value = CALCULATE([CY_Value], SAMEPERIODLASTYEAR('Date'[Date]))

 

ERD_0-1627735645452.png

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

 

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

Check out my latest demo report in the data story gallery.

Stand with Ukraine!


Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

i used this too. but it didnt come out. 

 

my CY_Value is a measure calculated with this formula. Somehow the CY_Value appear but the PY_Value is empty. I am not sure why too. 

 

Attrition Rate Overall =
DIVIDE(
    COUNT('Attrition'),
    DISTINCTCOUNT('Emp No')
)

Can you provide a pbix file with sample data? Or at least sample table in table format.

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

Check out my latest demo report in the data story gallery.

Stand with Ukraine!


Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

Helpful resources

Announcements
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.

Top Solution Authors