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.
Hi ,
I have a table which contains a perday value of Gross Tonnage.I have two others columns startdate and enddate.(For ex: start date is 3/12/2018 and enddate is 3/12/2020).I have a caculated column which looks at the start date and if startdate is less than 20th feb then year falls in the previous year and if startdate is more than 20th of feb then year falls in the same year.We call this year as a club year.
Below is my formula for club year:
Solved! Go to Solution.
Hi,
I change my original test table to this:
Then try this column:
Club Year = IF('Table'[Start Date]<DATE(YEAR('Table'[Start Date]),2,20),YEAR('Table'[Start Date])-1&"- Club Year",YEAR('Table'[Start Date])&"- Club Year")
It shows:
Then create a measure:
Measure = SUM('Table'[Gross Tonnage])*COUNTROWS('Table')
Choose one club year in slicer, the result shows:
Best Regards,
Giotto Zhi
Hi,
According to your description, i create a sample to test:
Then please try this column:
Club Year = IF('Table'[Date]<DATE(YEAR('Table'[Date]),2,20),YEAR('Table'[Date])-1&"- Club Year",YEAR('Table'[Date])&"- Club Year")
Choose this column and [Gross Tonnage] as a table visual, it shows the total values of each club year:
Hope this helps.
Best Regards,
Giotto Zhi
Hi Giotto
Thanks for your reply. There is no extra column of date in my table, it's just the start date and end date.
And a club year logic(20th feb of year to 20th of feb of next year) which is used as a slicer.I need to multiply the perdaygrosstonnage with no.of effective days in the particular club year and show that as a sum for all the policies.
Kind regards
Amit Kumar
Hi,
I change my original test table to this:
Then try this column:
Club Year = IF('Table'[Start Date]<DATE(YEAR('Table'[Start Date]),2,20),YEAR('Table'[Start Date])-1&"- Club Year",YEAR('Table'[Start Date])&"- Club Year")
It shows:
Then create a measure:
Measure = SUM('Table'[Gross Tonnage])*COUNTROWS('Table')
Choose one club year in slicer, the result shows:
Best Regards,
Giotto Zhi
Hey @a4
I don't see the screenshot you mention, but I am currently experiencing wifi problems so that may just be me.
I believe all you need is the SAMEPERIODLASTYEAR function found here: https://docs.microsoft.com/en-us/dax/sameperiodlastyear-function-dax
If you need it to interact with your slicer you can use the SELECTEDVALUE function to do that: https://docs.microsoft.com/en-us/dax/selectedvalue-function
Examples: https://powerpivotpro.com/2018/02/using-selectedvalues-capture-power-bi-slicer-selections/
https://stackoverflow.com/questions/50929240/how-to-capture-slicer-value-by-dax-measure
If this helps please kudo.
If this solves your problem please accept it as a solution.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |