Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
I have a fact table showing direct and indirect costs by year.
e.g. each project can have direct and inidrect costs for each year of the project.
Some projects may be 2 years, some may be 5 years in length.
I am trying to calculate total costs (sum of direct and indirect, excluding the year), but for the year, teh year in the column header is adding columns for all years, even if the select project only has a small number of years.
In this example proj a has 2 years, but when i do my total cost calculation, the matrix adds a column for all years.
e.g. for proj a there should be year 1 & year 2 total costs, direct and indirect, but im seeing 7 years of them as another project has 7 years.
The pic below shows what i want to get (1st table) and what i actually get (2nd table)
Appreciate any help. An example pbix is located here
https://1drv.ms/u/s!AgldA0VQfPV9hNBEkjNN5mdorq779A
Solved! Go to Solution.
You may add IF.
IF (
HASONEVALUE ( factBudgets[Year] ),
You may add IF.
IF (
HASONEVALUE ( factBudgets[Year] ),
Thank you, that works!
I dont undetstand how it works however, could i trouble you for an explination?
Also, although it was not a requirement, the measure now only works on the matrix now, it wont work on a table, is it a case i need a seperate measure for a table and for a matrix in this situation?
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 55 | |
| 40 | |
| 35 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 71 | |
| 70 | |
| 38 | |
| 35 | |
| 23 |