Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
I am attempting to make a measure that calculates SUM(Num_Compliant) / SUM(Num_Asked) for a District, filtered to the current Fiscal Year (i.e. Date on or after 07/01/2018, or July 1, 2018).
With the following sample data,
I expect the following results:
| District | Numerator | Denominator | Value |
| A | 4 | 14 | 0.29 |
| B | 10 | 14 | 0.71 |
| C | 6 | 14 | 0.4 3 |
I am aware that the denominators are always 14 in this sample data, but that is not the case in the real data, as, in practice, sections are sometimes missing.
I have been trying to solve this for about a day, and am brand-new to Power BI, so I apologize if this is a very simple question.
Solved! Go to Solution.
hi, @Anonymous
You could try this way as below:
Is there a Fiscal Calendar table in your report, if not add a Fiscal Calendar table then create a relationship with basic data table.
Then create measure as below:
Total NumAsked = SUM('Table'[Num_Asked])
Total NumCompliant = SUM('Table'[Num_Compliant])
Value = DIVIDE([Total NumCompliant],[Total NumAsked])
Result:
here is pbix file, please try it.
Best Regards,
Lin
hi, @Anonymous
You could try this way as below:
Is there a Fiscal Calendar table in your report, if not add a Fiscal Calendar table then create a relationship with basic data table.
Then create measure as below:
Total NumAsked = SUM('Table'[Num_Asked])
Total NumCompliant = SUM('Table'[Num_Compliant])
Value = DIVIDE([Total NumCompliant],[Total NumAsked])
Result:
here is pbix file, please try it.
Best Regards,
Lin
Hi @Anonymous ,
There are different possible answers. Here is a link with a pbix file with the desired output.
I chose to create a table to identify the fiscal year period. It is better to keep it dynamic and allow users to change it.
Please check the file, the different measures created and give me your feedback.
Cheers
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 |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 64 | |
| 32 | |
| 31 | |
| 27 |