Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hello,
Hoping someone could help me out with a measure Ive been trying to create.
I'm basically trying to create a new measure using the Field "Voucher Number" which will be "Count Distinct", but only bring back Quarter 1, and then Quarters 2, 3 and 4 (I think i'll be able to figure it out the other 3 once I figure out the quarter 1)
I can do this by using the Visualation "Card", by using the "Filters on the visual" ... hopefully the screen grab will help you see what I did ...
The name of the data set is "123_Charge_Data_Set" ... I'm using field "Voucher_Number" ... and a DOS - Quarter filter ...
Thanks for the help in advance 🙂
Solved! Go to Solution.
Hi, @jonnyA
It should be caused by different data types used for comparison. You can try the following Measure.
Vouchers Qtr 1 =
CALCULATE (
DISTINCTCOUNT ( Charge_Dataset[Voucher_Number] ),
FILTER ( 'Charge_Dataset', Quarter(Charge_Dataset[DOS])= 1 )
)
Best Regards,
Caiyun Zheng
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@v-cazheng-msft , if interested in solving, i having another issue related to the measure. I cant get my total to sum correctly for Total Patients. The total should be 4075, but Power BI is showing 4073.
Here are some of the measurse I am using ...
I tweaked the formula you gave me to count Patients.
@v-cazheng-msft , thank you for your time and effort with this issue. You last solution worked, high five!
Hi, @jonnyA
You can try a Measure like the following.
Vouchers Qtr 1 =
CALCULATE (
DISTINCTCOUNT ( Charge_Dataset[Voucher_Number] ),
FILTER ( 'Charge_Dataset', Charge_Dataset[DOS].[Quarter] = "Qtr 1" )
)
Best Regards,
Caiyun Zheng
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Your formula is very close, but when I do it on my end the formula is not liking where you have put "[Quarter]"
Any advice?
Thank you!
Hi, @jonnyA
You can replace it with the QUARTER function.
Vouchers Qtr 1 =
CALCULATE (
DISTINCTCOUNT ( Charge_Dataset[Voucher_Number] ),
FILTER ( 'Charge_Dataset', Quarter(Charge_Dataset[DOS])= "Qtr 1" )
)
Best Regards,
Caiyun Zheng
@v-cazheng-msft , thank you for your time and effort with my issue. For whatever reason, Power BI is not liking that formula. I couldnt get it to work.
Hi, @jonnyA
It should be caused by different data types used for comparison. You can try the following Measure.
Vouchers Qtr 1 =
CALCULATE (
DISTINCTCOUNT ( Charge_Dataset[Voucher_Number] ),
FILTER ( 'Charge_Dataset', Quarter(Charge_Dataset[DOS])= 1 )
)
Best Regards,
Caiyun Zheng
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Sorry, but I cannot really see what is under that yellow appart from the red squiggles. Do you maybe have some extra spaces in there? I did a quick test with what I believe is a similar structure and it worked fine.
Here it is again. I dont believe there are any unwanted spaces. Is the "." between [DOS] and [Quarter] correct? Im stumped? Do you have any other ideas?
@d_gosbell , thank you for your respone, much appreciation 🙂
However, the measure is not liking something as you can see the red squigglies under [Quarter].
I circled the DOS Date Hierarchy.
Thanks in advance for the help!
If I'm understanding your requirements correctly you should be able to create a measure something like the following to create a measure that always returns the Qtr 1 value
Vouchers Qtr 1 = CALCULATE(
DISTINCTCOUNT( '123_Charge_Data_Set'[Voucher_Number] ),
'123_Charge_Data_Set'[DOS].[Quarter] = "Qtr 1"
)
@d_gosbell , thank you for your respone, much appreciation 🙂
However, the measure is not liking something as you can see the red squigglies under [Quarter].
I circled the DOS Date Hierarchy.
Thanks in advance for the help!
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
90 | |
88 | |
83 | |
64 | |
49 |
User | Count |
---|---|
127 | |
108 | |
87 | |
70 | |
66 |