The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Good day,
I am using the following formula:
measureName = IF(HASONEFILTER('TableA'[Date].[Year]),SUM('TableA'[numbers]),BLANK())
This measure brings information if the year is pressed, I need help with the following:
If the data segmentation of the year is pressed, it does not show any results and if it is pressed, only the month does not show any results, it should only show information if the year and month are pressed at the same time.
thank you.
Solved! Go to Solution.
Hello, thanks for answering.
I solved it in the following way.
I added the following to the function: &&HASONEFILTER(Calendar[Date].[Month])
It remained like this:
IF(HASONEFILTER('TableA'[Date].[Year])&& (HASONEFILTER('TableA'[Date].[Month]),SUM('TableA'[numbers]),BLANK())
I force the year and month segmentation buttons to be selected, if one is not selected, it does not show information.
Hello, thanks for replying.
Fix it as follows.
add the following to the function: &&HASONEFILTER(Calendar[Date].[ Month])
It looks like this:
IF(HASONEFILTER('Table'[date].[ Year])&& (HASONEFILTER('Tablea'[date].[ Month]),SUM('TableA'[numbers]),BLANK())
I force that the year and month segmentation buttons are selected, if any is not selected it does not show information.
Nice day
I am using the following formula:
nameMeasure = IF(HASONEFILTER('TableA'[Date].[ Year]),SUM('TableA'[numbers]),BLANK())
This measure brings information if the year is pressed, I need help with the following:
if the year slicer is pressed does not show any results and if it is pressed only month does not show any results, it should only show information if it is pressed year and month at the same time.
Thanks a lot.
@Syndicate_Admin , better you create a new column year column and use that
Year = Year([Date])
then
nameMeasure = IF(HASONEFILTER('TableA'[ Year]),SUM('TableA'[numbers]),BLANK())
also refer
https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/
Hello, thanks for replying.
Fix it as follows.
add the following to the function: &&HASONEFILTER(Calendar[Date].[ Month])
It looks like this:
IF(HASONEFILTER('Table'[date].[ Year])&& (HASONEFILTER('Tablea'[date].[ Month]),SUM('TableA'[numbers]),BLANK())
I force that the year and month segmentation buttons are selected, if any is not selected it does not show information.
better you create a new column year column and use that
Year = Year([Date])
then
measureName = IF(HASONEFILTER('TableA'[Year]),SUM('TableA'[numbers]),BLANK())
refer
https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/
Hello, thanks for answering.
I solved it in the following way.
I added the following to the function: &&HASONEFILTER(Calendar[Date].[Month])
It remained like this:
IF(HASONEFILTER('TableA'[Date].[Year])&& (HASONEFILTER('TableA'[Date].[Month]),SUM('TableA'[numbers]),BLANK())
I force the year and month segmentation buttons to be selected, if one is not selected, it does not show information.
User | Count |
---|---|
78 | |
74 | |
42 | |
32 | |
28 |
User | Count |
---|---|
104 | |
93 | |
52 | |
50 | |
46 |